summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-12-15 19:54:35 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-12-15 19:54:35 +0000
commitcfbcf03ba0b120a2d17bacb2fbfd1c4a132da3cd (patch)
tree5755b0ee1d4c6f133a6e3daee032dfd01dc8e0aa /recordmydesktop/src
parentefaabd37eab44ac9f056811296552f469bb9fe74 (diff)
replaced wait on cond_var with a usleep for the duration of the first frame
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@239 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r--recordmydesktop/src/capture_sound.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/recordmydesktop/src/capture_sound.c b/recordmydesktop/src/capture_sound.c
index 5ba27f7..40afa0e 100644
--- a/recordmydesktop/src/capture_sound.c
+++ b/recordmydesktop/src/capture_sound.c
@@ -33,11 +33,10 @@ void *CaptureSound(ProgData *pdata){
int framesize=((snd_pcm_format_width(SND_PCM_FORMAT_S16_LE))/8)*pdata->args.channels;
pthread_mutex_t pmut,tmut;
pthread_mutex_init(&pmut,NULL);
- pthread_mutex_init(&tmut,NULL);
- //start capturing only when everything else is finsihed
- //ideally, at the same time that the first frame is captured
- pthread_cond_wait(&pdata->time_cond,&tmut);
+ //start capturing only after first frame is taken
+ usleep(pdata->frametime);
+
while(pdata->running){
int sret=0;
SndBuffer *newbuf,*tmp;
© All Rights Reserved