Commit c5d8c3a9 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

Fix logic error when switching audio API

parent c9f1e9c7
......@@ -35,8 +35,7 @@
#include "manager.h"
AudioLayer::AudioLayer (int type)
: layerType_ (type)
, isStarted_ (false)
: isStarted_ (false)
, urgentRingBuffer_ (SIZEBUF, Call::DEFAULT_ID)
, recorder_ (0)
, indexIn_ (0)
......@@ -49,6 +48,7 @@ AudioLayer::AudioLayer (int type)
, errorMessage_ (0)
, mutex_ ()
, audioPref(Manager::instance().audioPreference)
, layerType_ (type)
, lastNotificationTime_ (0)
{}
......
......@@ -224,8 +224,6 @@ class AudioLayer
protected:
int layerType_;
/**
* Drop the pending frames and close the capture device
*/
......@@ -301,6 +299,10 @@ class AudioLayer
AudioPreference &audioPref;
private:
const int layerType_;
/**
* Time of the last incoming call notification
*/
......
......@@ -2628,9 +2628,9 @@ void ManagerImpl::audioSamplingRateChanged (int samplerate)
delete _audiodriver;
if (type == PULSEAUDIO)
_audiodriver = new PulseLayer;
else
_audiodriver = new AlsaLayer;
else
_audiodriver = new PulseLayer;
_audiodriver->openDevice (numCardIn, numCardOut, numCardRing, samplerate, framesize,
SFL_PCM_BOTH, alsaPlugin);
......
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