openbsd-ports/graphics/fxtv/patches/patch-tvaudio_c

36 lines
1.1 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-tvaudio_c,v 1.2 2002/02/02 00:52:18 naddy Exp $
--- tvaudio.c.orig Mon Feb 12 10:56:29 2001
+++ tvaudio.c Wed Aug 15 13:46:30 2001
@@ -104,7 +104,7 @@ static void TVAUDIOSetMixerMask()
2001-03-07 02:55:57 -05:00
Mixer_dev_mask = SOUND_MASK_MIC;
Mixer_dev_name = "MIC";
}
-#ifdef SOUND_MIXER_VIDEO
+#if defined(SOUND_MIXER_VIDEO) && !defined(__OpenBSD__)
2001-03-07 02:55:57 -05:00
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
{
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 );
2001-03-07 02:55:57 -05:00
}
+
+ /* 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 );
}