[ekiga] Modified the way the audio event scheduler is managed (all the infrastructure was in place to proper
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Modified the way the audio event scheduler is managed (all the infrastructure was in place to proper
- Date: Thu, 17 Jan 2013 21:00:02 +0000 (UTC)
commit 53ca4971e704bde8971bf76f2359c5dc93aa7e77
Author: Julien Puydt <jpuydt free fr>
Date: Thu Jan 17 21:59:52 2013 +0100
Modified the way the audio event scheduler is managed (all the infrastructure was in place to properly manage it!)
lib/engine/audiooutput/audiooutput-core.cpp | 16 ++++++++++------
lib/engine/audiooutput/audiooutput-core.h | 2 +-
2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/lib/engine/audiooutput/audiooutput-core.cpp b/lib/engine/audiooutput/audiooutput-core.cpp
index 17d57ed..a085b28 100644
--- a/lib/engine/audiooutput/audiooutput-core.cpp
+++ b/lib/engine/audiooutput/audiooutput-core.cpp
@@ -47,12 +47,14 @@
using namespace Ekiga;
AudioOutputCore::AudioOutputCore (Ekiga::ServiceCore & _core)
-: audio_event_scheduler(*this), core(_core)
+ : core(_core)
{
PWaitAndSignal m_pri(core_mutex[primary]);
PWaitAndSignal m_sec(core_mutex[secondary]);
PWaitAndSignal m_vol(volume_mutex);
+ audio_event_scheduler = new AudioEventScheduler (*this);
+
current_primary_config.active = false;
current_primary_config.channels = 0;
current_primary_config.samplerate = 0;
@@ -81,6 +83,8 @@ AudioOutputCore::~AudioOutputCore ()
if (audiooutput_core_conf_bridge)
delete audiooutput_core_conf_bridge;
+ delete audio_event_scheduler;
+
for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
@@ -121,27 +125,27 @@ void AudioOutputCore::visit_managers (boost::function1<bool, AudioOutputManager
void AudioOutputCore::map_event (const std::string & event_name, const std::string & file_name, AudioOutputPS ps, bool enabled)
{
- audio_event_scheduler.set_file_name(event_name, file_name, ps, enabled);
+ audio_event_scheduler->set_file_name(event_name, file_name, ps, enabled);
}
void AudioOutputCore::play_file (const std::string & file_name)
{
- audio_event_scheduler.add_event_to_queue(file_name, true, 0, 0);
+ audio_event_scheduler->add_event_to_queue(file_name, true, 0, 0);
}
void AudioOutputCore::play_event (const std::string & event_name)
{
- audio_event_scheduler.add_event_to_queue(event_name, false, 0, 0);
+ audio_event_scheduler->add_event_to_queue(event_name, false, 0, 0);
}
void AudioOutputCore::start_play_event (const std::string & event_name, unsigned interval, unsigned repetitions)
{
- audio_event_scheduler.add_event_to_queue(event_name, false, interval, repetitions);
+ audio_event_scheduler->add_event_to_queue(event_name, false, interval, repetitions);
}
void AudioOutputCore::stop_play_event (const std::string & event_name)
{
- audio_event_scheduler.remove_event_from_queue(event_name);
+ audio_event_scheduler->remove_event_from_queue(event_name);
}
void AudioOutputCore::get_devices (std::vector <AudioOutputDevice> & devices)
diff --git a/lib/engine/audiooutput/audiooutput-core.h b/lib/engine/audiooutput/audiooutput-core.h
index 7aff46b..627e414 100644
--- a/lib/engine/audiooutput/audiooutput-core.h
+++ b/lib/engine/audiooutput/audiooutput-core.h
@@ -360,7 +360,7 @@ namespace Ekiga
PMutex volume_mutex;
AudioOutputCoreConfBridge* audiooutput_core_conf_bridge;
- AudioEventScheduler audio_event_scheduler;
+ AudioEventScheduler* audio_event_scheduler;
float average_level;
bool calculate_average;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]