/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "audioconfig.h"
AudioConfig::AudioConfig()
{
+ audio_in_driver = AUDIO_ALSA;
+ afirewire_in_port = 0;
+ afirewire_in_channel = 63;
+ strcpy(oss_in_device, "/dev/dsp");
+ oss_in_channels = 2;
+ oss_in_bits = 16;
+ strcpy(esound_in_server, "");
+ esound_in_port = 0;
+
+ audio_out_driver = AUDIO_ALSA;
+ strpcy(oss_out_device, "/dev/dsp");
+ oss_out_channels = 2;
+ oss_out_bits = 16;
+ strpcy(esound_out_server, "");
+ esound_out_port = 0;
+
+ audio_duplex_driver = AUDIO_ALSA;
+ strcpy(oss_duplex_device, "/dev/dsp");
+ oss_duplex_channels = 2;
+ oss_duplex_bits = 16;
+ strcpy(esound_duplex_server, "");
+ esound_duplex_port = 0;
}
AudioConfig::~AudioConfig()
int AudioConfig::load_defaults(BC_Hash *defaults)
{
- audio_in_driver = defaults->get("AUDIOINDRIVER", AUDIO_OSS);
+ audio_in_driver = defaults->get("AUDIOINDRIVER", AUDIO_ALSA);
afirewire_in_port = defaults->get("AFIREWIRE_IN_PORT", 0);
afirewire_in_channel = defaults->get("AFIREWIRE_IN_CHANNEL", 63);
sprintf(oss_in_device, "/dev/dsp");
defaults->get("ESOUND_IN_SERVER", esound_in_server);
esound_in_port = defaults->get("ESOUND_IN_PORT", 0);
- audio_out_driver = defaults->get("AUDIO_OUT_DRIVER", AUDIO_OSS);
- audio_duplex_driver = defaults->get("AUDIO_DUPLEX_DRIVER", AUDIO_OSS);
+ audio_out_driver = defaults->get("AUDIO_OUT_DRIVER", AUDIO_ALSA);
+ audio_duplex_driver = defaults->get("AUDIO_DUPLEX_DRIVER", AUDIO_ALSA);
sprintf(oss_out_device, "/dev/dsp");
defaults->get("OSS_OUT_DEVICE", oss_out_device);
oss_out_channels = defaults->get("OUT_CHANNELS", 2);
defaults->get("ESOUND_OUT_SERVER", esound_out_server);
esound_out_port = defaults->get("ESOUND_OUT_PORT", 0);
- audio_duplex_driver = defaults->get("AUDIO_DUPLEX_DRIVER", AUDIO_OSS);
+ audio_duplex_driver = defaults->get("AUDIO_DUPLEX_DRIVER", AUDIO_ALSA);
sprintf(oss_duplex_device, "/dev/dsp");
defaults->get("OSS_DUPLEX_DEVICE", oss_duplex_device);
oss_duplex_channels = defaults->get("DUPLEX_CHANNELS", 2);