Fix bug: alloca wrong size for audio buffer.

This commit is contained in:
Johns 2012-04-21 15:47:50 +02:00
parent e30e1e5aad
commit 93ddd26a4a
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Fix bug: alloca wrong size for audio buffer.
Handle jump in stream like stream start.
Always compile audio drift correction.
Add audio drift correction configuration to the setup.

View File

@ -3561,7 +3561,7 @@ void AudioEnqueue(const void *samples, int count)
frames =
count / (AudioRing[AudioRingWrite].InChannels * AudioBytesProSample);
buffer =
alloca(frames * AudioRing[AudioRingWrite].InChannels *
alloca(frames * AudioRing[AudioRingWrite].HwChannels *
AudioBytesProSample);
AudioResample(samples, AudioRing[AudioRingWrite].InChannels, frames,
buffer, AudioRing[AudioRingWrite].HwChannels);