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/capture_sound.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'recordmydesktop/src/capture_sound.c') diff --git a/recordmydesktop/src/capture_sound.c b/recordmydesktop/src/capture_sound.c index 0e89e21..c89909e 100644 --- a/recordmydesktop/src/capture_sound.c +++ b/recordmydesktop/src/capture_sound.c @@ -31,8 +31,6 @@ void *CaptureSound(ProgData *pdata){ #ifdef HAVE_LIBASOUND int frames=pdata->periodsize; - int framesize=((snd_pcm_format_width(SND_PCM_FORMAT_S16_LE))/8)* - pdata->args.channels; #endif //start capturing only after first frame is taken usleep(pdata->frametime); @@ -92,7 +90,7 @@ void *CaptureSound(ProgData *pdata){ //create new buffer newbuf=(SndBuffer *)malloc(sizeof(SndBuffer)); #ifdef HAVE_LIBASOUND - newbuf->data=(signed char *)malloc(frames*framesize); + newbuf->data=(signed char *)malloc(frames*pdata->sound_framesize); #else newbuf->data=(signed char *)malloc(((pdata->args.buffsize<<1)* pdata->args.channels)); @@ -103,7 +101,7 @@ void *CaptureSound(ProgData *pdata){ #ifdef HAVE_LIBASOUND while(sretsound_handle, - newbuf->data+framesize*sret, + newbuf->data+pdata->sound_framesize*sret, frames-sret); if(temp_sret==-EPIPE){ fprintf(stderr,"%s: Overrun occurred.\n", -- cgit v1.2.1