From bfc243a25074f519b994bb34143dc211961ccae0 Mon Sep 17 00:00:00 2001 From: iovar Date: Thu, 13 Dec 2007 14:53:02 +0000 Subject: 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 --- recordmydesktop/src/initialize_data.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'recordmydesktop/src/initialize_data.c') 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); -- cgit v1.2.1