[Toxine-cvs] CVS: toxine/src commands.c,1.82,1.83 utils.c,1.34,1.35 utils.h,1.18,1.19
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-23 12:09:55
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27641 Modified Files: commands.c utils.c utils.h Log Message: @@update audio vol/mute when requesting values. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- commands.c 23 Jul 2004 09:25:42 -0000 1.82 +++ commands.c 23 Jul 2004 12:09:47 -0000 1.83 @@ -1088,16 +1088,20 @@ if(toxine_is_arg_contain(tox, 2, "volume")) { - if(tox->audio.mixer.enable) + if(tox->audio.mixer.enable) { + toxine_get_audio_volume_value(tox); toxine_draw_bar(tox, "Current audio volume", 0, 100, tox->audio.mixer.volume_level); + } else pinfo("Audio mixer is disable.\n"); } else if(toxine_is_arg_contain(tox, 2, "mute")) { - if(tox->audio.mixer.enable) + if(tox->audio.mixer.enable) { + toxine_get_audio_mute_value(tox); pinfo("Audio mute status: %s\n", (tox->audio.mixer.mute) ? "muted" : "unmuted"); + } else pinfo("Audio mixer is disable.\n"); Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- utils.c 23 Jul 2004 09:25:42 -0000 1.34 +++ utils.c 23 Jul 2004 12:09:47 -0000 1.35 @@ -633,10 +633,20 @@ } } +void toxine_get_audio_volume_value(toxine_t *tox) { + if(tox->xine_state & XINE_OPEN) + tox->audio.mixer.volume_level = xine_get_param(tox->stream, XINE_PARAM_AUDIO_VOLUME); +} + +void toxine_get_audio_mute_value(toxine_t *tox) { + if(tox->xine_state & XINE_OPEN) + tox->audio.mixer.mute = xine_get_param(tox->stream, XINE_PARAM_AUDIO_MUTE); +} + void toxine_update_infos(toxine_t *tox) { if(tox->xine_state & XINE_OPEN) { - tox->audio.mixer.volume_level = xine_get_param(tox->stream, XINE_PARAM_AUDIO_VOLUME); - tox->audio.mixer.mute = xine_get_param(tox->stream, XINE_PARAM_AUDIO_MUTE); + toxine_get_audio_volume_value(tox); + toxine_get_audio_mute_value(tox); } } Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- utils.h 23 Jul 2004 09:25:42 -0000 1.18 +++ utils.h 23 Jul 2004 12:09:47 -0000 1.19 @@ -52,6 +52,8 @@ void toxine_config_load(toxine_t *tox); void toxine_config_save(toxine_t *tox); +void toxine_get_audio_volume_value(toxine_t *tox); +void toxine_get_audio_mute_value(toxine_t *tox); void toxine_update_infos(toxine_t *tox); void toxine_show_stream_info(toxine_t *tox, int info_type, uint32_t iinfo); |