summaryrefslogtreecommitdiff
path: root/dxr3output-audio.c
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-12-09 17:35:15 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-12-09 17:35:15 +0100
commitb610f9992f256ae4e62eabe2a32e079c7f5c58c1 (patch)
treee1b59137db83c6e8cfeb617123b104fa190e4d23 /dxr3output-audio.c
parentf58ade275c649976f1f1c54157b75befbbe4950c (diff)
downloadvdr-plugin-dxr3-b610f9992f256ae4e62eabe2a32e079c7f5c58c1.tar.gz
vdr-plugin-dxr3-b610f9992f256ae4e62eabe2a32e079c7f5c58c1.tar.bz2
switching from analog to digital works again
Diffstat (limited to 'dxr3output-audio.c')
-rw-r--r--dxr3output-audio.c28
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());
}