From 7b032b77026b6d6cac02e1d55ce9b3f47a60a553 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 7 May 2009 19:06:44 +0200 Subject: add methods to playback cDxr3PesFrames - untested --- dxr3output-audio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'dxr3output-audio.c') diff --git a/dxr3output-audio.c b/dxr3output-audio.c index 0d2e11d..4b478a6 100644 --- a/dxr3output-audio.c +++ b/dxr3output-audio.c @@ -23,6 +23,7 @@ #include #include "dxr3output.h" #include "dxr3audio.h" +#include "dxr3pesframe.h" // ================================== const int AUDIO_OFFSET = 4500; @@ -125,6 +126,19 @@ void cDxr3AudioOutThread::PlayFrame(cFixedLengthFrame *frame) audioOutput->write(frame->GetData(), frame->GetCount()); } +void cDxr3AudioOutThread::PlayFrame(cDxr3PesFrame *frame) +{ + // update audio context + audioOutput->setup(frame->GetSampleContext()); + + // volume changes + if (!cDxr3Interface::Instance().IsAudioModeAC3()) { + audioOutput->changeVolume((short *)frame->GetDecoded(), (size_t)frame->GetDecodedSize()); + } + + audioOutput->write((uchar *)frame->GetDecoded(), frame->GetDecodedSize()); +} + #undef SCR // Local variables: -- cgit v1.2.3