diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-12-09 17:35:15 +0100 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-12-09 17:35:15 +0100 |
commit | b610f9992f256ae4e62eabe2a32e079c7f5c58c1 (patch) | |
tree | e1b59137db83c6e8cfeb617123b104fa190e4d23 | |
parent | f58ade275c649976f1f1c54157b75befbbe4950c (diff) | |
download | vdr-plugin-dxr3-b610f9992f256ae4e62eabe2a32e079c7f5c58c1.tar.gz vdr-plugin-dxr3-b610f9992f256ae4e62eabe2a32e079c7f5c58c1.tar.bz2 |
switching from analog to digital works again
-rw-r--r-- | dxr3output-audio.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/dxr3output-audio.c b/dxr3output-audio.c index 5cb0e54..5588bc7 100644 --- a/dxr3output-audio.c +++ b/dxr3output-audio.c @@ -105,20 +105,22 @@ void cDxr3AudioOutThread::Action() void cDxr3AudioOutThread::PlayFrame(cFixedLengthFrame *frame) { - // update audio context - SampleContext ctx; - ctx.samplerate = frame->GetSampleRate(); - ctx.channels = frame->GetChannelCount(); - - // 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); - } + // only call setup and manipulate the volume for analog audio + if (!audioOutput->isDigitalAudio()) { + + // update audio context + SampleContext ctx; + ctx.samplerate = frame->GetSampleRate(); + ctx.channels = frame->GetChannelCount(); + + // 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 (!audio()->isAc3Dts()) { + // volume changes audioOutput->changeVolume((short *)frame->GetData(), (size_t)frame->GetCount()); } |