# HG changeset patch # User Jonathan Schleifer # Date 1195504556 -3600 # Node ID a838523e04b7c8e5df260abb672eb7f9c26b9e48 # Parent 2c0362980de5f6ad22af510ac3a36f6048fda57e Restore the channel's volume after playback. diff -r 2c0362980de5 -r a838523e04b7 src/OSS4/audio.c --- a/src/OSS4/audio.c Sun Nov 18 15:30:43 2007 -0600 +++ b/src/OSS4/audio.c Mon Nov 19 21:35:56 2007 +0100 @@ -48,6 +48,7 @@ static gchar *device_name; static GThread *buffer_thread; static gboolean select_works; +static int start_vol_l, start_vol_r; static int (*oss_convert_func) (void **data, int length); static int (*oss_stereo_convert_func) (void **data, int length, int fmt); @@ -434,6 +435,8 @@ return; going = 0; + oss_set_volume(start_vol_l, start_vol_r); + g_thread_join(buffer_thread); g_free(device_name); @@ -641,6 +644,8 @@ buffer_thread = g_thread_create(oss_loop, NULL, TRUE, NULL); + oss_get_volume(&start_vol_l, &start_vol_r); + return 1; }