summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/initialize_data.c
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-12-13 14:53:02 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-12-13 14:53:02 +0000
commitbfc243a25074f519b994bb34143dc211961ccae0 (patch)
treebd39cbd75e70793b44f12bc43ac6130e7b11ca6f /recordmydesktop/src/initialize_data.c
parentdaac9c24a44eac7ba0a7ec292ee05117e06947bb (diff)
doc/recordmydesktop.1: added documentation about -restore option
include/rmdfunc.h: read and write specs file function protorypes include/rmdtypes.h, src/cache_audio.c src/capture_sound.c, src/encode_sound_buffer.c, src/initialize_data.c, src/load_cache.c: framesize moved to pdata struct(used to be initialized separately by every function that used it). src/Makefile.am: added src/rmd_restore.c src/parseargs.c: handle -restore option src/recordmydesktop.c: argument parsing moved before any X calls (restore doesn't need a running X server) src/rmd_restore.c: initialize all needed structs and data, for restore to be performed. Then EncodeCache routine and exit. src/specsfile.c: read and write specs file function bodies git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@474 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/initialize_data.c')
-rw-r--r--recordmydesktop/src/initialize_data.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/recordmydesktop/src/initialize_data.c b/recordmydesktop/src/initialize_data.c
index a3566ba..2c2dad1 100644
--- a/recordmydesktop/src/initialize_data.c
+++ b/recordmydesktop/src/initialize_data.c
@@ -101,6 +101,10 @@ int InitializeData(ProgData *pdata,
&pdata->periodsize,
&pdata->periodtime,
&pdata->hard_pause);
+ pdata->sound_framesize=((snd_pcm_format_width(
+ SND_PCM_FORMAT_S16_LE))/8)*
+ pdata->args.channels;
+
if(pdata->sound_handle==NULL){
#else
pdata->sound_handle=OpenDev(pdata->args.device,
@@ -110,6 +114,7 @@ int InitializeData(ProgData *pdata,
((pdata->args.channels<<1)*pdata->args.frequency);
//when using OSS periodsize serves as an alias of buffsize
pdata->periodsize=pdata->args.buffsize;
+ pdata->sound_framesize=pdata->args.channels<<1;
if(pdata->sound_handle<0){
#endif
fprintf(stderr,"Error while opening/configuring soundcard %s\n"
@@ -138,6 +143,9 @@ int InitializeData(ProgData *pdata,
pdata->args.channels=pdata->jdata->nports;
pdata->periodtime=(1000000*pdata->args.buffsize)/
pdata->args.frequency;
+ pdata->sound_framesize=sizeof(jack_default_audio_sample_t)*
+ pdata->jdata->nports;
+
#else
fprintf(stderr,"Should not be here!\n");
exit(-1);
© All Rights Reserved