From 0506a8ef3e733cc1e5a708be42e7c9d92e34e679 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 26 Feb 2009 17:57:02 +0100 Subject: workaround: changing samplerate to -1 (old 48000) At the moment I am not sure who/what sets samplerate and channel to -1, but i hope to remove this workaround soon. --- dxr3output-audio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dxr3output-audio.c') diff --git a/dxr3output-audio.c b/dxr3output-audio.c index 34064cf..b664737 100644 --- a/dxr3output-audio.c +++ b/dxr3output-audio.c @@ -110,7 +110,13 @@ void cDxr3AudioOutThread::PlayFrame(cFixedLengthFrame *frame) SampleContext ctx; ctx.samplerate = frame->GetSampleRate(); ctx.channels = frame->GetChannelCount(); - audioOutput->setup(ctx); + + // TODO find cause why we need this workaround + if (ctx.samplerate != -1 && ctx.channels != -1) { + audioOutput->setup(ctx); + } else { + dsyslog("[fixme] samplerate: %d channels: %d", ctx.samplerate, ctx.channels); + } // volume changes if (!cDxr3Interface::Instance().IsAudioModeAC3()) { -- cgit v1.2.3