summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3audiodecoder.c4
-rw-r--r--dxr3device.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/dxr3audiodecoder.c b/dxr3audiodecoder.c
index 8995482..3d15dda 100644
--- a/dxr3audiodecoder.c
+++ b/dxr3audiodecoder.c
@@ -131,6 +131,10 @@ void cDxr3AudioDecoder::decode(cDxr3PesFrame *frame, iAudio *audio)
}
if (out_size) {
+ frame->ctx.channels = contextAudio->channels;
+ frame->ctx.samplerate = contextAudio->sample_rate;
+
+ audio->setup(frame->ctx);
audio->changeVolume((short *)pcmbuf, out_size);
audio->write(pcmbuf, out_size);
}
diff --git a/dxr3device.c b/dxr3device.c
index 29ba21a..253a09d 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -48,6 +48,7 @@ cDxr3Device::cDxr3Device() : pluginOn(true), vPts(0), scrSet(false), playCount(0
audioOut = new cAudioAlsa();
}
+ audioOut->openDevice();
aDecoder = new cDxr3AudioDecoder();
}