Mercurial > audlegacy-plugins
comparison src/Output/CoreAudio/init.c @ 0:13389e613d67 trunk
[svn] - initial import of audacious-plugins tree (lots to do)
| author | nenolod |
|---|---|
| date | Mon, 18 Sep 2006 01:11:49 -0700 |
| parents | |
| children | 088092a52fea |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:13389e613d67 |
|---|---|
| 1 /* XMMS - Cross-platform multimedia player | |
| 2 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |
| 3 * | |
| 4 * This program is free software; you can redistribute it and/or modify | |
| 5 * it under the terms of the GNU General Public License as published by | |
| 6 * the Free Software Foundation; either version 2 of the License, or | |
| 7 * (at your option) any later version. | |
| 8 * | |
| 9 * This program is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 14 * You should have received a copy of the GNU General Public License | |
| 15 * along with this program; if not, write to the Free Software | |
| 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
| 17 */ | |
| 18 #include "coreaudio.h" | |
| 19 #include "libaudacious/configdb.h" | |
| 20 | |
| 21 OSXConfig osx_cfg; | |
| 22 | |
| 23 extern float left_volume, right_volume; | |
| 24 | |
| 25 void osx_init(void) | |
| 26 { | |
| 27 ConfigDb *cfgfile; | |
| 28 | |
| 29 left_volume = 1.0; | |
| 30 right_volume = 1.0; | |
| 31 | |
| 32 memset(&osx_cfg, 0, sizeof (OSXConfig)); | |
| 33 | |
| 34 osx_cfg.audio_device = 0; | |
| 35 osx_cfg.mixer_device = 0; | |
| 36 osx_cfg.buffer_size = 3000; | |
| 37 osx_cfg.prebuffer = 25; | |
| 38 osx_cfg.use_alt_audio_device = FALSE; | |
| 39 osx_cfg.alt_audio_device = NULL; | |
| 40 osx_cfg.use_master=0; | |
| 41 | |
| 42 if ((cfgfile = bmp_cfg_db_open())) | |
| 43 { | |
| 44 bmp_cfg_db_get_int(cfgfile, "OSX", "audio_device", &osx_cfg.audio_device); | |
| 45 bmp_cfg_db_get_int(cfgfile, "OSX", "mixer_device", &osx_cfg.mixer_device); | |
| 46 bmp_cfg_db_get_int(cfgfile, "OSX", "buffer_size", &osx_cfg.buffer_size); | |
| 47 bmp_cfg_db_get_int(cfgfile, "OSX", "prebuffer", &osx_cfg.prebuffer); | |
| 48 bmp_cfg_db_get_bool(cfgfile, "OSX", "use_master", &osx_cfg.use_master); | |
| 49 bmp_cfg_db_get_bool(cfgfile, "OSX", "use_alt_audio_device", &osx_cfg.use_alt_audio_device); | |
| 50 bmp_cfg_db_get_string(cfgfile, "OSX", "alt_audio_device", &osx_cfg.alt_audio_device); | |
| 51 bmp_cfg_db_get_bool(cfgfile, "OSX", "use_alt_mixer_device", &osx_cfg.use_alt_mixer_device); | |
| 52 bmp_cfg_db_get_string(cfgfile, "OSX", "alt_mixer_device", &osx_cfg.alt_mixer_device); | |
| 53 bmp_cfg_db_close(cfgfile); | |
| 54 } | |
| 55 } |
