comparison src/OSS/OSS.c @ 3103:b562bc52a93e

ported OSS
author Michal Lipski <tallica@o2.pl>
date Thu, 30 Apr 2009 18:06:46 +0200
parents 3134a0987162
children
comparison
equal deleted inserted replaced
3102:6520d2c15c6f 3103:b562bc52a93e
52 "USA."), _("Ok"), FALSE, NULL, NULL); 52 "USA."), _("Ok"), FALSE, NULL, NULL);
53 g_signal_connect(G_OBJECT(about_dialog), "destroy", 53 g_signal_connect(G_OBJECT(about_dialog), "destroy",
54 G_CALLBACK(gtk_widget_destroyed), &about_dialog); 54 G_CALLBACK(gtk_widget_destroyed), &about_dialog);
55 } 55 }
56 56
57 static void oss_init(void) 57 static OutputPluginInitStatus oss_init(void)
58 { 58 {
59 mcs_handle_t *db; 59 mcs_handle_t *db;
60 60
61 memset(&oss_cfg, 0, sizeof(OSSConfig)); 61 memset(&oss_cfg, 0, sizeof(OSSConfig));
62 62
82 &oss_cfg.use_alt_mixer_device); 82 &oss_cfg.use_alt_mixer_device);
83 aud_cfg_db_get_string(db, "OSS", "alt_mixer_device", 83 aud_cfg_db_get_string(db, "OSS", "alt_mixer_device",
84 &oss_cfg.alt_mixer_device); 84 &oss_cfg.alt_mixer_device);
85 aud_cfg_db_close(db); 85 aud_cfg_db_close(db);
86 } 86 }
87
88 return OUTPUT_PLUGIN_INIT_FOUND_DEVICES;
87 } 89 }
88 90
89 static void oss_cleanup(void) 91 static void oss_cleanup(void)
90 { 92 {
91 if (oss_cfg.alt_audio_device) { 93 if (oss_cfg.alt_audio_device) {
98 oss_cfg.alt_mixer_device = NULL; 100 oss_cfg.alt_mixer_device = NULL;
99 } 101 }
100 } 102 }
101 103
102 static OutputPlugin oss_op = { 104 static OutputPlugin oss_op = {
103 .description = "OSS Output Plugin", /* Description */ 105 .description = "OSS Output Plugin",
106 .probe_priority = 1,
104 .init = oss_init, 107 .init = oss_init,
105 .cleanup = oss_cleanup, 108 .cleanup = oss_cleanup,
106 .about = oss_about, 109 .about = oss_about,
107 .configure = oss_configure, 110 .configure = oss_configure,
108 .get_volume = oss_get_volume, 111 .get_volume = oss_get_volume,