Permalink
Browse files

Disable passthrough only if using the software volume controller.

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 9499674e4eec1c6bdde1da12c013e5edd52bb8ed
@@ -243,8 +243,8 @@ AudioOutputSettings* AudioOutputBase::GetOutputSettingsUsers(bool digital)
bool AudioOutputBase::CanPassthrough(int samplerate, int channels,
int codec, int profile) const
{
- bool ret = !internal_vol;
DigitalFeature arg = FEATURE_NONE;
+ bool ret = !(internal_vol && SWVolume());
switch(codec)
{
@@ -17,7 +17,7 @@ VolumeBase::VolumeBase() :
(gCoreContext->GetSetting("MixerDevice", "default").toLower() == "software");
}
-bool VolumeBase::SWVolume(void)
+bool VolumeBase::SWVolume(void) const
{
return swvol;
}
@@ -17,7 +17,7 @@ class MPUBLIC VolumeBase
virtual ~VolumeBase() {};
void SWVolume(bool set);
- bool SWVolume(void);
+ bool SWVolume(void) const;
virtual uint GetCurrentVolume(void) const;
virtual void SetCurrentVolume(int value);
virtual void AdjustCurrentVolume(int change);
@@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// 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.
*
@@ -123,10 +123,6 @@ class AudioReencodeBuffer : public AudioOutput
{
last_audiotime = timecode;
}
- virtual bool CanPassthrough(int, int) const
- {
- return false;
- }
virtual bool IsPaused(void) const
{
return false;
@@ -217,7 +213,8 @@ class AudioReencodeBuffer : public AudioOutput
/**
* 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 ab_count;

0 comments on commit 9499674

Please sign in to comment.