diff options
-rw-r--r-- | dxr3device.c | 19 | ||||
-rw-r--r-- | dxr3device.h | 8 |
2 files changed, 6 insertions, 21 deletions
diff --git a/dxr3device.c b/dxr3device.c index dbc16c5..f99da4c 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -86,25 +86,18 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) { dsyslog("[dxr3-device] setting playmode %d", PlayMode); - if (PlayMode != pmExtern_THIS_SHOULD_BE_AVOIDED) { - turnPlugin(true); - return true; - } - switch (PlayMode) { - case pmExtern_THIS_SHOULD_BE_AVOIDED: - turnPlugin(false); - break; - case pmNone: + audioOut->setEnabled(false); break; case pmAudioVideo: - case pmAudioOnly: - case pmAudioOnlyBlack: - case pmVideoOnly: + audioOut->setEnabled(true); + break; - m_PlayMode = PlayMode; + default: + dsyslog("[dxr3-device] playmode not supported"); + return false; } return true; diff --git a/dxr3device.h b/dxr3device.h index 9fcacb7..1b88504 100644 --- a/dxr3device.h +++ b/dxr3device.h @@ -71,19 +71,11 @@ public: // osd virtual cSpuDecoder *GetSpuDecoder(); - - // helper function - void Reset() - { - SetPlayMode(m_PlayMode); - } - iAudio *getAudioOutput() const { return audioOut; } void turnPlugin(bool on); private: - ePlayMode m_PlayMode; cDxr3SpuDecoder* m_spuDecoder; iAudio *audioOut; bool pluginOn; |