summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/encode_sound_buffer.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/encode_sound_buffer.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/encode_sound_buffer.c')
-rw-r--r--recordmydesktop/src/encode_sound_buffer.c11
1 files changed, 4 insertions, 7 deletions
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;j<pdata->args.channels;j++){
© All Rights Reserved