Commit b399adc0 authored by jpbl's avatar jpbl
Browse files

removed the input/output audio difference

parent 48a1081d
......@@ -55,20 +55,20 @@ AudioLayer::closeStream (void)
}
void
AudioLayer::openDevice (int outputIndex, int inputIndex)
AudioLayer::openDevice (int index)
{
closeStream();
// Set up the parameters required to open a (Callback)Stream:
portaudio::DirectionSpecificStreamParameters
outParams(portaudio::System::instance().deviceByIndex(outputIndex),
outParams(portaudio::System::instance().deviceByIndex(index),
2, portaudio::INT16, true,
portaudio::System::instance().deviceByIndex(outputIndex).defaultLowOutputLatency(),
portaudio::System::instance().deviceByIndex(index).defaultLowOutputLatency(),
NULL);
portaudio::DirectionSpecificStreamParameters
inParams(portaudio::System::instance().deviceByIndex(inputIndex),
inParams(portaudio::System::instance().deviceByIndex(index),
2, portaudio::INT16, true,
portaudio::System::instance().deviceByIndex(inputIndex).defaultLowInputLatency(),
portaudio::System::instance().deviceByIndex(index).defaultLowInputLatency(),
NULL);
portaudio::StreamParameters const params(inParams, outParams,
......
......@@ -42,7 +42,7 @@ public:
AudioLayer();
~AudioLayer (void);
void openDevice (int, int);
void openDevice (int);
void startStream (void);
void stopStream (void);
void sleep (int);
......
......@@ -111,7 +111,7 @@ void ConfigurationPanel::init()
((QRadioButton*)stunButtonGroup->find(get_config_fields_int(SIGNALISATION, USE_STUN)))->setChecked(true);
// For audio tab
((QRadioButton*)DriverChoice->find(get_config_fields_int(AUDIO, OUTPUT_DRIVER_NAME)))->setChecked(true);
((QRadioButton*)DriverChoice->find(get_config_fields_int(AUDIO, DRIVER_NAME)))->setChecked(true);
codec1->setCurrentText(QString(get_config_fields_str(AUDIO, CODEC1)));
codec2->setCurrentText(QString(get_config_fields_str(AUDIO, CODEC2)));
......
......@@ -874,8 +874,7 @@ ManagerImpl::initConfigFile (void)
fill_config_fields_str(SIGNALISATION, STUN_SERVER, DFT_STUN_SERVER);
fill_config_fields_int(SIGNALISATION, USE_STUN, NO);
fill_config_fields_int(AUDIO, OUTPUT_DRIVER_NAME, DFT_DRIVER);
fill_config_fields_int(AUDIO, INPUT_DRIVER_NAME, DFT_DRIVER);
fill_config_fields_int(AUDIO, DRIVER_NAME, DFT_DRIVER);
fill_config_fields_int(AUDIO, NB_CODEC, DFT_NB_CODEC);
fill_config_fields_str(AUDIO, CODEC1, DFT_CODEC);
fill_config_fields_str(AUDIO, CODEC2, DFT_CODEC);
......@@ -915,8 +914,7 @@ ManagerImpl::selectAudioDriver (void)
#if defined(AUDIO_PORTAUDIO)
_audiodriverPA = new AudioLayer();
_audiodriverPA->openDevice(get_config_fields_int(AUDIO, OUTPUT_DRIVER_NAME),
get_config_fields_int(AUDIO, INPUT_DRIVER_NAME));
_audiodriverPA->openDevice(get_config_fields_int(AUDIO, DRIVER_NAME));
#else
# error You must define one AUDIO driver to use.
#endif
......
......@@ -63,8 +63,7 @@
#define SEND_DTMF_AS "DTMF.sendDTMFas"
#define STUN_SERVER "STUN.STUNserver"
#define USE_STUN "STUN.useStun"
#define OUTPUT_DRIVER_NAME "Drivers.outputDriverName"
#define INPUT_DRIVER_NAME "Drivers.inputDriverName"
#define DRIVER_NAME "Drivers.driverName"
#define NB_CODEC "Codecs.nbCodec"
#define CODEC1 "Codecs.codec1"
#define CODEC2 "Codecs.codec2"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment