comparison src/OSS4/OSS4.c @ 1244:d0f1e147cf62

now it saves VMIX volume between sessions
author Cristi Magherusan <majeru@atheme-project.org>
date Thu, 12 Jul 2007 18:21:23 +0300
parents 2a722c3ccd9e
children a18b7cdc505d
comparison
equal deleted inserted replaced
1243:4cf6ccace89c 1244:d0f1e147cf62
22 #include "OSS4.h" 22 #include "OSS4.h"
23 23
24 #include <glib.h> 24 #include <glib.h>
25 #include <audacious/i18n.h> 25 #include <audacious/i18n.h>
26 #include <stdlib.h> 26 #include <stdlib.h>
27 #include <audacious/configdb.h>
27 28
28 OutputPlugin oss_op = { 29 OutputPlugin oss_op = {
29 NULL, 30 NULL,
30 NULL, 31 NULL,
31 "OSS4 Output Plugin", /* Description */ 32 "OSS4 Output Plugin", /* Description */
51 52
52 DECLARE_PLUGIN(OSS4, NULL, NULL, NULL, oss_oplist, NULL, NULL, NULL); 53 DECLARE_PLUGIN(OSS4, NULL, NULL, NULL, oss_oplist, NULL, NULL, NULL);
53 54
54 void oss_cleanup(void) 55 void oss_cleanup(void)
55 { 56 {
57 ConfigDb *db;
58 db = bmp_cfg_db_open();
59 bmp_cfg_db_set_int(db, "OSS", "saved_volume", vol);
60 bmp_cfg_db_close(db);
61
56 if (oss_cfg.alt_audio_device) { 62 if (oss_cfg.alt_audio_device) {
57 free(oss_cfg.alt_audio_device); 63 free(oss_cfg.alt_audio_device);
58 oss_cfg.alt_audio_device = NULL; 64 oss_cfg.alt_audio_device = NULL;
59 } 65 }
60 66
61 if (oss_cfg.alt_mixer_device) { 67 if (oss_cfg.alt_mixer_device) {
62 free(oss_cfg.alt_mixer_device); 68 free(oss_cfg.alt_mixer_device);
63 oss_cfg.alt_mixer_device = NULL; 69 oss_cfg.alt_mixer_device = NULL;
64 } 70 }
65 } 71 }