Navigation Menu

Skip to content

Commit

Permalink
Disable passthrough only if using the software volume controller.
Browse files Browse the repository at this point in the history
If using another type of mixer; as it will be ignored we can passthrough. Alternatively, if Myth Volume control was checked, but nothing else was configured; it could have resulted in a bug (try to passthrough, but would enable audio processing).

Fixes #9688
  • Loading branch information
jyavenard committed Mar 28, 2011
1 parent 9d26f5f commit 9499674
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -243,8 +243,8 @@ AudioOutputSettings* AudioOutputBase::GetOutputSettingsUsers(bool digital)
bool AudioOutputBase::CanPassthrough(int samplerate, int channels, bool AudioOutputBase::CanPassthrough(int samplerate, int channels,
int codec, int profile) const int codec, int profile) const
{ {
bool ret = !internal_vol;
DigitalFeature arg = FEATURE_NONE; DigitalFeature arg = FEATURE_NONE;
bool ret = !(internal_vol && SWVolume());


switch(codec) switch(codec)
{ {
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/volumebase.cpp
Expand Up @@ -17,7 +17,7 @@ VolumeBase::VolumeBase() :
(gCoreContext->GetSetting("MixerDevice", "default").toLower() == "software"); (gCoreContext->GetSetting("MixerDevice", "default").toLower() == "software");
} }


bool VolumeBase::SWVolume(void) bool VolumeBase::SWVolume(void) const
{ {
return swvol; return swvol;
} }
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/volumebase.h
Expand Up @@ -17,7 +17,7 @@ class MPUBLIC VolumeBase
virtual ~VolumeBase() {}; virtual ~VolumeBase() {};


void SWVolume(bool set); void SWVolume(bool set);
bool SWVolume(void); bool SWVolume(void) const;
virtual uint GetCurrentVolume(void) const; virtual uint GetCurrentVolume(void) const;
virtual void SetCurrentVolume(int value); virtual void SetCurrentVolume(int value);
virtual void AdjustCurrentVolume(int change); virtual void AdjustCurrentVolume(int change);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes. /// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and /// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins. /// libmythui class methods used by plug-ins.
#define MYTH_BINARY_VERSION "0.25.20110326-1" #define MYTH_BINARY_VERSION "0.25.20110328-1"


/** \brief Increment this whenever the MythTV network protocol changes. /** \brief Increment this whenever the MythTV network protocol changes.
* *
Expand Down
7 changes: 2 additions & 5 deletions mythtv/programs/mythtranscode/transcode.cpp
Expand Up @@ -123,10 +123,6 @@ class AudioReencodeBuffer : public AudioOutput
{ {
last_audiotime = timecode; last_audiotime = timecode;
} }
virtual bool CanPassthrough(int, int) const
{
return false;
}
virtual bool IsPaused(void) const virtual bool IsPaused(void) const
{ {
return false; return false;
Expand Down Expand Up @@ -217,7 +213,8 @@ class AudioReencodeBuffer : public AudioOutput
/** /**
* Test if we can output digital audio * Test if we can output digital audio
*/ */
virtual bool CanPassthrough(int, int, int) const { return m_initpassthru; } virtual bool CanPassthrough(int, int, int, int) const
{ return m_initpassthru; }


int bufsize; int bufsize;
int ab_count; int ab_count;
Expand Down

0 comments on commit 9499674

Please sign in to comment.