summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/opendev.c
diff options
context:
space:
mode:
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