# HG changeset patch # User voroshil # Date 1162924060 0 # Node ID eb15b01a50cb01b7e8ff1b1c6d1252db29737fb4 # Parent 49a9454c2e61d598dd3f3ed1a18a333302f12c95 Restoring volume level of radio card on exit. diff -r 49a9454c2e61 -r eb15b01a50cb stream/stream_radio.c --- a/stream/stream_radio.c Tue Nov 07 18:20:07 2006 +0000 +++ b/stream/stream_radio.c Tue Nov 07 18:27:40 2006 +0000 @@ -113,6 +113,7 @@ radio_channels_t* radio_channel_list; radio_channels_t* radio_channel_current; int driver; + int old_snd_volume; #ifdef USE_RADIO_CAPTURE volatile int do_capture; ///< is capture enabled audio_in_t audio_in; @@ -1020,6 +1021,7 @@ mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_RadioDevice, priv->radio_fd,radio_param_device); fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC); + get_volume(priv, &priv->old_snd_volume); set_volume(priv,0); if (init_frac(priv)!=STREAM_OK){ @@ -1093,6 +1095,7 @@ priv->radio_channel_current=NULL; priv->radio_channel_list=NULL; + set_volume(priv, priv->old_snd_volume); if (priv->radio_fd>0){ close(priv->radio_fd); }