Skip to content
Snippets Groups Projects
Commit be13ffa0 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Close ticket #59, change audio plugin during a conversation

disable the functionality
parent cfc6a358
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,12 @@ AlsaLayer::closeLayer()
AlsaLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize, int stream , std::string plugin)
{
// We don't accept that the audio plugin is changed during a conversation
if( _talk ){
_debug("can't switch audio plugin when talking\n. Please hang up and try again...\n");
return false;
}
if(deviceClosed == false)
{
if( stream == SFL_PCM_CAPTURE )
......@@ -694,4 +700,4 @@ AlsaLayer::adjustVolume( void* buffer , int len, int stream )
return src ;
}
void AlsaLayer::setPlaybackVolume( double volume ){}
void AlsaLayer::setPlaybackVolume( double volume UNUSED){}
......@@ -1274,10 +1274,12 @@ ManagerImpl::setInputAudioPlugin(const std::string& audioPlugin)
void
ManagerImpl::setOutputAudioPlugin(const std::string& audioPlugin)
{
//int layer = _audiodriver -> getLayerType();
int res;
_debug("Set output audio plugin\n");
_audiodriver -> setErrorMessage( -1 );
_audiodriver -> openDevice( _audiodriver -> getIndexIn(),
res = _audiodriver -> openDevice( _audiodriver -> getIndexIn(),
_audiodriver -> getIndexOut(),
_audiodriver -> getSampleRate(),
_audiodriver -> getFrameSize(),
......@@ -1286,7 +1288,7 @@ ManagerImpl::setOutputAudioPlugin(const std::string& audioPlugin)
if( _audiodriver -> getErrorMessage() != -1)
notifyErrClient( _audiodriver -> getErrorMessage() );
// set config
setConfig( AUDIO , ALSA_PLUGIN , audioPlugin );
if(res) setConfig( AUDIO , ALSA_PLUGIN , audioPlugin );
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment