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/encode_sound_buffer.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'recordmydesktop/src/encode_sound_buffer.c') diff --git a/recordmydesktop/src/encode_sound_buffer.c b/recordmydesktop/src/encode_sound_buffer.c index 7945567..1000743 100644 --- a/recordmydesktop/src/encode_sound_buffer.c +++ b/recordmydesktop/src/encode_sound_buffer.c @@ -31,12 +31,8 @@ void *EncodeSoundBuffer(ProgData *pdata){ int sampread=pdata->periodsize; #ifdef HAVE_JACK_H void *jackbuf=NULL; - int framesize=sizeof(jack_default_audio_sample_t)* - pdata->jdata->nports; if(pdata->args.use_jack){ - framesize=sizeof(jack_default_audio_sample_t)* - pdata->jdata->nports; - jackbuf=malloc(framesize*pdata->jdata->buffersize); + jackbuf=malloc(pdata->sound_framesize*pdata->jdata->buffersize); } #endif pdata->v_encoding_clean=0; @@ -84,10 +80,11 @@ void *EncodeSoundBuffer(ProgData *pdata){ else{ #ifdef HAVE_JACK_H if((*jack_ringbuffer_read_space_p)(pdata->jdata->sound_buffer)>= - (framesize*pdata->jdata->buffersize)){ + (pdata->sound_framesize*pdata->jdata->buffersize)){ (*jack_ringbuffer_read_p)(pdata->jdata->sound_buffer, jackbuf, - (framesize*pdata->jdata->buffersize)); + (pdata->sound_framesize* + pdata->jdata->buffersize)); vorbis_buffer=vorbis_analysis_buffer(&pdata->enc_data->m_vo_dsp, sampread); for(j=0;jargs.channels;j++){ -- cgit v1.2.1