aboutsummaryrefslogtreecommitdiffstats
path: root/src/tvtimeconf.c
diff options
context:
space:
mode:
authorvektor <devnull@localhost>2004-08-27 01:18:52 +0000
committervektor <devnull@localhost>2004-08-27 01:18:52 +0000
commit6253d4ac51846fca65a7d219879cac746c43b508 (patch)
treea5e09c362e3b23324118d7cec4a999c42206e3ac /src/tvtimeconf.c
parent6a59cd07a22ae2882f6fdf87586ac48fb4e7a0d9 (diff)
26 Aug 2004 Billy Biggs <vektor@dumbterm.net>
* tvtime/src/tvtimeconf.c: Add config file parameters to save the state of the mixer device across sessions, and to indicate whether we should mute the device on exit or not. * tvtime/src/tvtimeconf.h: New API. * tvtime/src/tvtime.c: When we exit, save the mute state, the unmute volume, and mute the capture card too. * tvtime/src/mixer.h: Add some useful functions to make this all work. * tvtime/src/mixer.c: Implementation. * tvtime/docs/tvtime.xml.5: Document the new config file parameters for saving mute state, unmute volume, and a setting for whether we should mute on exit. * tvtime/docs/html/default.tvtime.xml: Document them here too. * tvtime/ChangeLog: Note these features in the ChangeLog.
Diffstat (limited to 'src/tvtimeconf.c')
-rw-r--r--src/tvtimeconf.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tvtimeconf.c b/src/tvtimeconf.c
index db8b50f..facc1e6 100644
--- a/src/tvtimeconf.c
+++ b/src/tvtimeconf.c
@@ -73,6 +73,9 @@ struct config_s
int mirror;
int boost;
int quiet_screenshots;
+ int unmute_volume;
+ int muted;
+ int mute_on_exit;
int keymap[ 8 * MAX_KEYSYMS ];
char *keymap_arg[ 8 * MAX_KEYSYMS ];
@@ -224,6 +227,18 @@ static void parse_option( config_t *ct, xmlNodePtr node )
ct->quiet_screenshots = atoi( curval );
}
+ if( !xmlStrcasecmp( name, BAD_CAST "UnmuteVolume" ) ) {
+ ct->unmute_volume = atoi( curval );
+ }
+
+ if( !xmlStrcasecmp( name, BAD_CAST "Muted" ) ) {
+ ct->muted = atoi( curval );
+ }
+
+ if( !xmlStrcasecmp( name, BAD_CAST "MuteOnExit" ) ) {
+ ct->mute_on_exit = atoi( curval );
+ }
+
if( !xmlStrcasecmp( name, BAD_CAST "ShowCC" ) ) {
ct->cc = atoi( curval );
}
@@ -695,6 +710,9 @@ config_t *config_new( void )
ct->mirror = 0;
ct->boost = -1;
ct->quiet_screenshots = 0;
+ ct->unmute_volume = -1;
+ ct->muted = 0;
+ ct->mute_on_exit = 1;
memset( ct->keymap, 0, sizeof( ct->keymap ) );
memset( ct->keymap_arg, 0, sizeof( ct->keymap_arg ) );
@@ -1571,3 +1589,18 @@ int config_get_quiet_screenshots( config_t *ct )
return ct->quiet_screenshots;
}
+int config_get_unmute_volume( config_t *ct )
+{
+ return ct->unmute_volume;
+}
+
+int config_get_muted( config_t *ct )
+{
+ return ct->muted;
+}
+
+int config_get_mute_on_exit( config_t *ct )
+{
+ return ct->mute_on_exit;
+}
+

Privacy Policy