Commit 9da45829 authored by jpbl's avatar jpbl
Browse files

Little cleanups

parent 56aebb88
......@@ -28,11 +28,11 @@
#include "../global.h"
#include "../manager.h"
AudioLayer::AudioLayer(ManagerImpl& manager)
AudioLayer::AudioLayer()
: _urgentRingBuffer(SIZEBUF)
, _mainSndRingBuffer(SIZEBUF)
, _micRingBuffer(SIZEBUF)
, _stream(NULL), _manager(manager)
, _stream(NULL)
{
_debugInit(" portaudio initialization...");
portaudio::System::initialize();
......@@ -102,7 +102,7 @@ void
AudioLayer::startStream(void)
{
ost::MutexLock guard(_mutex);
if (_manager.isDriverLoaded()) {
if (Manager::instance().isDriverLoaded()) {
if (_stream && !_stream->isActive()) {
_debug("Thread: start audiolayer stream\n");
_stream->start();
......@@ -114,7 +114,7 @@ void
AudioLayer::stopStream(void)
{
ost::MutexLock guard(_mutex);
if (_manager.isDriverLoaded()) {
if (Manager::instance().isDriverLoaded()) {
if (_stream && !_stream->isStopped()) {
_debug("Thread: stop audiolayer stream\n");
_stream->stop();
......@@ -195,8 +195,8 @@ AudioLayer::audioCallback (const void *inputBuffer, void *outputBuffer,
int urgentAvail, // number of int16 right and int16 left
normalAvail, // number of int16 right and int16 left
micAvailPut;
unsigned short spkrVolume = _manager.getSpkrVolume();
unsigned short micVolume = _manager.getMicVolume();
unsigned short spkrVolume = Manager::instance().getSpkrVolume();
unsigned short micVolume = Manager::instance().getMicVolume();
// AvailForGet tell the number of chars inside the buffer
// framePerBuffer are the number of int16 for one channel (left)
......
......@@ -41,7 +41,7 @@ class RingBuffer;
class AudioLayer {
public:
AudioLayer(ManagerImpl& manager);
AudioLayer();
~AudioLayer (void);
void listDevices();
......@@ -72,7 +72,6 @@ private:
portaudio::MemFunCallbackStream<AudioLayer> *_stream;
// portaudio::AutoSystem autoSys;
ost::Mutex _mutex;
ManagerImpl& _manager;
int NBCHARFORTWOINT16;
};
......
......@@ -1144,7 +1144,7 @@ ManagerImpl::selectAudioDriver (void)
#if defined(AUDIO_PORTAUDIO)
try {
_debugInit(" AudioLayer Creation");
_audiodriverPA = new AudioLayer(*this);
_audiodriverPA = new AudioLayer();
int noDevice = getConfigInt(AUDIO, DRIVER_NAME);
_debugInit(" AudioLayer Device Count");
int nbDevice = portaudio::System::instance().deviceCount();
......@@ -1199,7 +1199,7 @@ ManagerImpl::initVolume()
* Main Thread
*/
bool
ManagerImpl::getZeroconf(const std::string& sequenceId)
ManagerImpl::getZeroconf(const std::string& )
{
bool returnValue = false;
#ifdef USE_ZEROCONF
......@@ -1241,7 +1241,7 @@ ManagerImpl::getZeroconf(const std::string& sequenceId)
* Main Thread
*/
bool
ManagerImpl::attachZeroconfEvents(const std::string& , Pattern::Observer& observer)
ManagerImpl::attachZeroconfEvents(const std::string& , Pattern::Observer& )
{
bool returnValue = false;
// don't need the _gui like getZeroconf function
......@@ -1257,7 +1257,7 @@ ManagerImpl::attachZeroconfEvents(const std::string& , Pattern::Observer& observ
return returnValue;
}
bool
ManagerImpl::detachZeroconfEvents(Pattern::Observer& observer)
ManagerImpl::detachZeroconfEvents(Pattern::Observer& )
{
bool returnValue = false;
#ifdef USE_ZEROCONF
......
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