From 93ddd26a4a8983859a4f6f29979f0c5b1cce12ed Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 21 Apr 2012 15:47:50 +0200 Subject: [PATCH] Fix bug: alloca wrong size for audio buffer. --- ChangeLog | 1 + audio.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9b95a65..e0829be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/audio.c b/audio.c index 9753970..84e2748 100644 --- a/audio.c +++ b/audio.c @@ -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);