From 8a725405c8014235bf2b5b5010bfcb1003d324aa Mon Sep 17 00:00:00 2001 From: enselic Date: Sat, 13 Sep 2008 13:28:47 +0000 Subject: include/rmdtypes.h include/recordmydesktop.h: Continue the globals killing spree by putting pause_mutex and time_mutex in ProgData instead of having them as globals. src/get_frame.c src/rmd_timer.c src/cache_audio.c src/cache_frame.c src/capture_sound.c src/initialize_data.c src/encode_image_buffer.c src/encode_sound_buffer.c: Adapt. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@532 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/capture_sound.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'recordmydesktop/src/capture_sound.c') diff --git a/recordmydesktop/src/capture_sound.c b/recordmydesktop/src/capture_sound.c index 71424f9..d32715e 100644 --- a/recordmydesktop/src/capture_sound.c +++ b/recordmydesktop/src/capture_sound.c @@ -43,16 +43,16 @@ void *CaptureSound(ProgData *pdata){ #ifdef HAVE_LIBASOUND if(!pdata->hard_pause){ snd_pcm_pause(pdata->sound_handle,1); - pthread_mutex_lock(&pause_mutex); - pthread_cond_wait(&pdata->pause_cond,&pause_mutex); - pthread_mutex_unlock(&pause_mutex); + pthread_mutex_lock(&pdata->pause_mutex); + pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex); + pthread_mutex_unlock(&pdata->pause_mutex); snd_pcm_pause(pdata->sound_handle,0); } else{//device doesn't support pause(is this the norm?mine doesn't) snd_pcm_close(pdata->sound_handle); - pthread_mutex_lock(&pause_mutex); - pthread_cond_wait(&pdata->pause_cond,&pause_mutex); - pthread_mutex_unlock(&pause_mutex); + pthread_mutex_lock(&pdata->pause_mutex); + pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex); + pthread_mutex_unlock(&pdata->pause_mutex); pdata->sound_handle= OpenDev(pdata->args.device, &pdata->args.channels, @@ -72,9 +72,9 @@ void *CaptureSound(ProgData *pdata){ } #else close(pdata->sound_handle); - pthread_mutex_lock(&pause_mutex); - pthread_cond_wait(&pdata->pause_cond,&pause_mutex); - pthread_mutex_unlock(&pause_mutex); + pthread_mutex_lock(&pdata->pause_mutex); + pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex); + pthread_mutex_unlock(&pdata->pause_mutex); pdata->sound_handle= OpenDev(pdata->args.device, pdata->args.channels, -- cgit v1.2.3