diff --git a/src/audio/audiolayer.cpp b/src/audio/audiolayer.cpp index be779b9ecf43737a31bd0703c855cd0f707afc8e..c6642ddeea26e254788c2a44ca1b89cf7473e577 100644 --- a/src/audio/audiolayer.cpp +++ b/src/audio/audiolayer.cpp @@ -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, diff --git a/src/audio/audiolayer.h b/src/audio/audiolayer.h index 61931ba06717cdd0fcf2761e55e02efa827b869b..165e455fa8b26fc3069a7d17d21db3cef13e0161 100644 --- a/src/audio/audiolayer.h +++ b/src/audio/audiolayer.h @@ -42,7 +42,7 @@ public: AudioLayer(); ~AudioLayer (void); - void openDevice (int, int); + void openDevice (int); void startStream (void); void stopStream (void); void sleep (int); diff --git a/src/gui/qt/configurationpanel.ui.h b/src/gui/qt/configurationpanel.ui.h index 0f377596d5b5cfcc0e308bf7165816207f379b11..15bf76339dc288d94cd7f646b1f0f237052970fc 100644 --- a/src/gui/qt/configurationpanel.ui.h +++ b/src/gui/qt/configurationpanel.ui.h @@ -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))); diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 7495b9f47f76910ab7ffdae289ac2b477c31d8e3..edf87d109955606d237e904718a824060d663920 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -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 diff --git a/src/user_cfg.h b/src/user_cfg.h index a8cdc27ae84c2afa88c057cc17c7578f39fc81a2..c57c2a220b8f62d031612b314ea172147bf6c1a7 100644 --- a/src/user_cfg.h +++ b/src/user_cfg.h @@ -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"