diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2015-04-15 19:24:03 +0200 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2015-04-15 19:24:03 +0200 |
| commit | f92425c8b2ec7858b54d532c3680a07f4e0dc63e (patch) | |
| tree | 235d591c58be2b031174a0c41becbc610be51b20 | |
| parent | df4e38ae264bea41448f35ae9f617da91c1a6019 (diff) | |
| download | vdr-plugin-rpihddevice-f92425c8b2ec7858b54d532c3680a07f4e0dc63e.tar.gz vdr-plugin-rpihddevice-f92425c8b2ec7858b54d532c3680a07f4e0dc63e.tar.bz2 | |
don't depend on multi channel PCM support for digital audio pass-through
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | audio.c | 20 |
2 files changed, 6 insertions, 15 deletions
@@ -7,6 +7,7 @@ VDR Plugin 'rpihddevice' Revision History - added font kerning - support for GPU accelerated pixmaps - fixed: + - don't depend on multi channel PCM support for digital audio pass-through - improved video frame rate detection to be more tolerant to inaccurate values - adapted cOvgRawOsd::Flush() to new cOsd::RenderPixmaps() of vdr-2.1.10 - fixed calculation of string height (reported by Klaus Schmidinger) @@ -995,35 +995,25 @@ public: if (codec != cAudioCodec::eInvalid && channels > 0) { m_inChannels = channels; - cRpiAudioPort::ePort newPort = cRpiAudioPort::eLocal; + cRpiAudioPort::ePort newPort = cRpiSetup::GetAudioPort(); cAudioCodec::eCodec newCodec = cAudioCodec::ePCM; DLOG("new audio codec: %dch %s", channels, cAudioCodec::Str(codec)); - if (cRpiSetup::GetAudioPort() == cRpiAudioPort::eHDMI && - cRpiSetup::IsAudioFormatSupported(cAudioCodec::ePCM, channels, - samplingRate)) + if (newPort == cRpiAudioPort::eHDMI) { - newPort = cRpiAudioPort::eHDMI; - // check if pass through is possible if (cRpiSetup::IsAudioFormatSupported(codec, channels, samplingRate)) newCodec = codec; - // if we decode locally, upmix mono channels to 2.0 - else if (channels == 1) + // check for multi channel PCM, stereo downmix if not supported + else if (!cRpiSetup::IsAudioFormatSupported(cAudioCodec::ePCM, + channels, samplingRate)) channels = 2; } else - { channels = 2; - // if 2ch PCM audio on HDMI is supported - if (cRpiSetup::GetAudioPort() == cRpiAudioPort::eHDMI && - cRpiSetup::IsAudioFormatSupported(cAudioCodec::ePCM, 2, - samplingRate)) - newPort = cRpiAudioPort::eHDMI; - } // if the user changes the port, this should change immediately if (newPort != m_port) |
