diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 18:27:40 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 18:27:40 +0000 |
commit | 506cc511a7a5ab8aa60f7cd6fbce4bef846320b6 (patch) | |
tree | 790f46bc06ac8c071f2128147a4b05a61de99c0c /stream | |
parent | 057630b2a5c3680b0c8a312a34bf6e7f51440e7a (diff) |
Restoring volume level of radio card on exit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20753 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_radio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 7daed44cd8..761c8ce9a6 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -113,6 +113,7 @@ typedef struct radio_priv_s { 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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { 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 @@ static void close_s(struct stream_st * stream){ 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); } |