summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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());
}