diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-25 07:33:21 +0100 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-25 07:33:21 +0100 |
commit | 80e640c072b80590b3cc818e25a80589f515f4a4 (patch) | |
tree | 981767ce2874f0640a40d20d7d07b70749319af5 /dxr3output-audio.c | |
parent | 5ec77bd73a9de9611498893130e4e5b300b29c75 (diff) | |
download | vdr-plugin-dxr3-80e640c072b80590b3cc818e25a80589f515f4a4.tar.gz vdr-plugin-dxr3-80e640c072b80590b3cc818e25a80589f515f4a4.tar.bz2 |
factor our audio stuff from dxr3interface.h
With this commit ALSA support is only some commits away. This commit
introduces cAudioOss, which has everything needed in it to handle a oss
audio device. There are some problems, which will fixed soon.
For instance, external mode is not supported at the moment.
Diffstat (limited to 'dxr3output-audio.c')
-rw-r--r-- | dxr3output-audio.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dxr3output-audio.c b/dxr3output-audio.c index af1a879..34064cf 100644 --- a/dxr3output-audio.c +++ b/dxr3output-audio.c @@ -106,11 +106,18 @@ void cDxr3AudioOutThread::Action() void cDxr3AudioOutThread::PlayFrame(cFixedLengthFrame *frame) { + // update audio context + SampleContext ctx; + ctx.samplerate = frame->GetSampleRate(); + ctx.channels = frame->GetChannelCount(); + audioOutput->setup(ctx); + + // volume changes if (!cDxr3Interface::Instance().IsAudioModeAC3()) { audioOutput->changeVolume((short *)frame->GetData(), (size_t)frame->GetCount()); } - m_dxr3Device.PlayAudioFrame(frame); + audioOutput->write(frame->GetData(), frame->GetCount()); } #undef SCR |