From b702dea20395f5a5f7186479dadcc77cbaf32af4 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Mon, 28 Jun 2010 13:16:40 -0400 Subject: [PATCH] [#2165] Implement run method in audiorecorder --- sflphone-common/src/audio/recordable.cpp | 2 +- sflphone-common/src/call.cpp | 2 +- sflphone-common/src/conference.cpp | 2 +- sflphone-common/src/managerimpl.h | 9 ++++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sflphone-common/src/audio/recordable.cpp b/sflphone-common/src/audio/recordable.cpp index 79740fb777..8371bf7ec8 100644 --- a/sflphone-common/src/audio/recordable.cpp +++ b/sflphone-common/src/audio/recordable.cpp @@ -30,7 +30,7 @@ #include "recordable.h" #include "manager.h" -Recordable::Recordable() : recorder(&recAudio) +Recordable::Recordable() : recorder(&recAudio, Manager::instance().getMainBuffer()) { FILE_TYPE fileType = FILE_WAV; diff --git a/sflphone-common/src/call.cpp b/sflphone-common/src/call.cpp index 65195f5f50..0185cf6817 100644 --- a/sflphone-common/src/call.cpp +++ b/sflphone-common/src/call.cpp @@ -194,7 +194,7 @@ Call::setRecording() if(!recordStatus) return false; - MainBuffer *mbuffer = &(Manager::instance()._mainBuffer); + MainBuffer *mbuffer = Manager::instance().getMainBuffer(); CallID process_id = Recordable::recorder.getRecorderID(); diff --git a/sflphone-common/src/conference.cpp b/sflphone-common/src/conference.cpp index 17ee9a39b5..b32629acb6 100644 --- a/sflphone-common/src/conference.cpp +++ b/sflphone-common/src/conference.cpp @@ -167,7 +167,7 @@ bool Conference::setRecording() { if(!recordStatus) return false; - MainBuffer *mbuffer = &(Manager::instance()._mainBuffer); + MainBuffer *mbuffer = Manager::instance().getMainBuffer(); ParticipantSet::iterator iter = _participants.begin(); diff --git a/sflphone-common/src/managerimpl.h b/sflphone-common/src/managerimpl.h index 700bb1721d..fc457c767d 100644 --- a/sflphone-common/src/managerimpl.h +++ b/sflphone-common/src/managerimpl.h @@ -1240,7 +1240,6 @@ class ManagerImpl { void unloadAccountMap(); - public: /** * Instance of the MainBuffer for the whole application * @@ -1251,6 +1250,14 @@ class ManagerImpl { MainBuffer _mainBuffer; + public: + + /** + * Return a pointer to the instance of the mainbuffer + */ + MainBuffer *getMainBuffer(void) { return &_mainBuffer; } + + /** * Tell if there is a current call processed * @return bool True if there is a current call -- GitLab