summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/opendev.c
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-12-09 13:25:18 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-12-09 13:25:18 +0000
commit5cc91a08f6313e0b758063b7dfd31244d43eb9a0 (patch)
tree32984f973b7698406f34530dc389d85a223442cc /recordmydesktop/src/opendev.c
parent2d2449959edc3b6dfef3b43980fcd10c202455e4 (diff)
minor corrections in sound handling
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@225 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/opendev.c')
-rw-r--r--recordmydesktop/src/opendev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/recordmydesktop/src/opendev.c b/recordmydesktop/src/opendev.c
index 7eb5d2b..9250bab 100644
--- a/recordmydesktop/src/opendev.c
+++ b/recordmydesktop/src/opendev.c
@@ -31,7 +31,7 @@
snd_pcm_t *OpenDev(const char *pcm_dev,unsigned int *channels,unsigned int *frequency,snd_pcm_uframes_t *periodsize,unsigned int *periodtime,int *hard_pause){
-
+
snd_pcm_t *mhandle;
snd_pcm_hw_params_t *hwparams;
unsigned int periods=2;
@@ -76,7 +76,7 @@ snd_pcm_t *OpenDev(const char *pcm_dev,unsigned int *channels,unsigned int *freq
fprintf(stderr, "Couldn't set periods.\n");
return NULL;
}
- buffsize=(exactrate*(*channels))/2;
+ buffsize=(exactrate)>>2;
if (snd_pcm_hw_params_set_buffer_size_near(mhandle, hwparams,&buffsize)<0){
fprintf(stderr, "Couldn't set buffer size.\n");
return NULL;
© All Rights Reserved