36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
$OpenBSD: patch-tvaudio_c,v 1.3 2010/05/22 14:12:50 espie Exp $
|
|
--- tvaudio.c.orig Mon Feb 12 15:56:29 2001
|
|
+++ tvaudio.c Sat May 22 16:04:14 2010
|
|
@@ -104,7 +104,7 @@ static void TVAUDIOSetMixerMask()
|
|
Mixer_dev_mask = SOUND_MASK_MIC;
|
|
Mixer_dev_name = "MIC";
|
|
}
|
|
-#ifdef SOUND_MIXER_VIDEO
|
|
+#if defined(SOUND_MIXER_VIDEO) && !defined(__OpenBSD__)
|
|
else if ( STREQ( buf, "VIDEO" ) ) {
|
|
Mixer_dev_id = SOUND_MIXER_VIDEO;
|
|
Mixer_dev_mask = SOUND_MASK_VIDEO;
|
|
@@ -204,12 +204,22 @@ void TVAUDIOSetMuteState( TV_BOOL mute_on )
|
|
{
|
|
TV_AUDIO *a = &G_glob.audio;
|
|
TV_CAPTURE *c = &G_glob.capture;
|
|
+ static TV_INT32 ov;
|
|
|
|
/* Accomplish mute via capture card audio mute */
|
|
if ( a->mute_on != mute_on ) {
|
|
a->mute_on = mute_on;
|
|
TVCAPTURESetAudioMute( c, a->mute_on );
|
|
}
|
|
+
|
|
+ /* Fake mute via line audio */
|
|
+ if(a->mute_on) {
|
|
+ TVAUDIOGetLineVolume(&ov);
|
|
+ TVAUDIOSetLineVolume(0, FALSE);
|
|
+ } else {
|
|
+ TVAUDIOSetLineVolume(ov, FALSE);
|
|
+ }
|
|
+
|
|
TVTOOLSSetToggleState( TV_TOOLITEM_MUTE, !a->mute_on );
|
|
}
|
|
|