Mercurial > audlegacy-plugins
changeset 2177:a838523e04b7
Restore the channel's volume after playback.
author | Jonathan Schleifer <js@webkeks.org> |
---|---|
date | Mon, 19 Nov 2007 21:35:56 +0100 |
parents | 2c0362980de5 |
children | 2f6d5e1a22cd |
files | src/OSS4/audio.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }