diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-02-20 12:30:31 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-02-20 12:30:31 +0000 |
commit | 1e1fcd158ae0b63a215b0d79ea147e0d91a40a79 (patch) | |
tree | cfa8e7b41a73cfacf8ef00c0cbd44f4e19959b8c /recordmydesktop/src/rmd_jack.c | |
parent | 225a939a00490c2e6f45cd068abd514c96dde50e (diff) |
added configurable ringbuffer size,
corrected a mistake that blocked compilation(from last commit at shminfo initialization),
removed the options from USAGE in the manpage and the program ,since it's too bloated to be usefull
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@285 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/rmd_jack.c')
-rw-r--r-- | recordmydesktop/src/rmd_jack.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/recordmydesktop/src/rmd_jack.c b/recordmydesktop/src/rmd_jack.c index 6d846a1..9047e8f 100644 --- a/recordmydesktop/src/rmd_jack.c +++ b/recordmydesktop/src/rmd_jack.c @@ -136,6 +136,7 @@ void JackShutdown(void *jdata_t){ } int StartJackClient(JackData *jdata){ + float ring_buffer_size=0.0; if(LoadJackLib(jdata->jack_lib_handle)){ fprintf (stderr,"Couldn't load the Jack library (libjack.so)!\n"); @@ -161,11 +162,12 @@ int StartJackClient(JackData *jdata){ //and any recording up to that point will be encoded and saved. jdata->frequency=jack_get_sample_rate_p(jdata->client); jdata->buffersize=jack_get_buffer_size_p(jdata->client); + ring_buffer_size=(jdata->ringbuffer_secs* + jdata->frequency* + sizeof(jack_default_audio_sample_t)* + jdata->nports); jdata->sound_buffer= - (*jack_ringbuffer_create_p)(jdata->nports* - sizeof(jack_default_audio_sample_t)* - jdata->buffersize* - BUFFERS_IN_RING); + (*jack_ringbuffer_create_p)((int)(ring_buffer_size+0.5));//round up jack_set_process_callback_p(jdata->client,JackCapture,jdata); jack_on_shutdown_p(jdata->client,JackShutdown,jdata); |