aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-09 03:10:14 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-09 03:10:14 +0000
commitfb7de941c3a948ed68915b4ad249831a70d4ff79 (patch)
tree12cc702879a62b091e1524fc0ae571da790a6b32 /src/audio.c
parentc3eabe01dafec8b16f04824b74b365a7ebffb866 (diff)
downloadmpd-fb7de941c3a948ed68915b4ad249831a70d4ff79.tar.gz
mpd-fb7de941c3a948ed68915b4ad249831a70d4ff79.tar.xz
mpd-fb7de941c3a948ed68915b4ad249831a70d4ff79.zip
don't set granulepos, that's pad, mmmkay?
git-svn-id: https://svn.musicpd.org/mpd/trunk@2555 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index 47c1880cc..41489742a 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -261,7 +261,8 @@ int openAudioDevice(AudioFormat * audioFormat) {
if(!audioOpened || !isCurrentFormat) {
flushAudioBuffer();
copyAudioFormat(&audio_format, audioFormat);
- audioBufferSize = (audio_format.bits/8)*audio_format.channels;
+ audioBufferSize = (audio_format.bits >> 3)*
+ audio_format.channels;
audioBufferSize*= audio_format.sampleRate >> 5;
audioBuffer = realloc(audioBuffer, audioBufferSize);
}