Mercurial > hg > svapp
comparison audio/AudioCallbackPlaySource.cpp @ 687:e0b0f3e163ca by-id
Update for removal of (public) getId from Model
author | Chris Cannam |
---|---|
date | Fri, 05 Jul 2019 15:35:11 +0100 |
parents | 161063152ddd |
children | ce698f8d0831 |
comparison
equal
deleted
inserted
replaced
686:610fa108fbcc | 687:e0b0f3e163ca |
---|---|
98 | 98 |
99 connect(this, SIGNAL(playStatusChanged(bool)), | 99 connect(this, SIGNAL(playStatusChanged(bool)), |
100 m_viewManager, SLOT(playStatusChanged(bool))); | 100 m_viewManager, SLOT(playStatusChanged(bool))); |
101 | 101 |
102 connect(PlayParameterRepository::getInstance(), | 102 connect(PlayParameterRepository::getInstance(), |
103 SIGNAL(playParametersChanged(PlayParameters *)), | 103 SIGNAL(playParametersChanged(int)), |
104 this, SLOT(playParametersChanged(PlayParameters *))); | 104 this, SLOT(playParametersChanged(int))); |
105 | 105 |
106 connect(Preferences::getInstance(), | 106 connect(Preferences::getInstance(), |
107 SIGNAL(propertyChanged(PropertyContainer::PropertyName)), | 107 SIGNAL(propertyChanged(PropertyContainer::PropertyName)), |
108 this, SLOT(preferenceChanged(PropertyContainer::PropertyName))); | 108 this, SLOT(preferenceChanged(PropertyContainer::PropertyName))); |
109 } | 109 } |
292 | 292 |
293 #ifdef DEBUG_AUDIO_PLAY_SOURCE | 293 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
294 SVDEBUG << "AudioCallbackPlaySource::addModel: now have " << m_models.size() << " model(s)" << endl; | 294 SVDEBUG << "AudioCallbackPlaySource::addModel: now have " << m_models.size() << " model(s)" << endl; |
295 #endif | 295 #endif |
296 | 296 |
297 connect(model.get(), SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), | 297 connect(model.get(), SIGNAL(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t)), |
298 this, SLOT(modelChangedWithin(sv_frame_t, sv_frame_t))); | 298 this, SLOT(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t))); |
299 | 299 |
300 #ifdef DEBUG_AUDIO_PLAY_SOURCE | 300 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
301 cout << "AudioCallbackPlaySource::addModel: awakening thread" << endl; | 301 cout << "AudioCallbackPlaySource::addModel: awakening thread" << endl; |
302 #endif | 302 #endif |
303 | 303 |
304 m_condition.wakeAll(); | 304 m_condition.wakeAll(); |
305 } | 305 } |
306 | 306 |
307 void | 307 void |
308 AudioCallbackPlaySource::modelChangedWithin(sv_frame_t | 308 AudioCallbackPlaySource::modelChangedWithin(ModelId, sv_frame_t |
309 #ifdef DEBUG_AUDIO_PLAY_SOURCE | 309 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
310 startFrame | 310 startFrame |
311 #endif | 311 #endif |
312 , sv_frame_t endFrame) | 312 , sv_frame_t endFrame) |
313 { | 313 { |
330 | 330 |
331 #ifdef DEBUG_AUDIO_PLAY_SOURCE | 331 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
332 cout << "AudioCallbackPlaySource::removeModel(" << modelId << ")" << endl; | 332 cout << "AudioCallbackPlaySource::removeModel(" << modelId << ")" << endl; |
333 #endif | 333 #endif |
334 | 334 |
335 disconnect(model.get(), SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), | 335 disconnect(model.get(), SIGNAL(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t)), |
336 this, SLOT(modelChangedWithin(sv_frame_t, sv_frame_t))); | 336 this, SLOT(modelChangedWithin(ModelId, sv_frame_t, sv_frame_t))); |
337 | 337 |
338 m_models.erase(modelId); | 338 m_models.erase(modelId); |
339 | 339 |
340 sv_frame_t lastEnd = 0; | 340 sv_frame_t lastEnd = 0; |
341 for (ModelId otherId: m_models) { | 341 for (ModelId otherId: m_models) { |
574 clearRingBuffers(); | 574 clearRingBuffers(); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 void | 578 void |
579 AudioCallbackPlaySource::playParametersChanged(PlayParameters *) | 579 AudioCallbackPlaySource::playParametersChanged(int) |
580 { | 580 { |
581 clearRingBuffers(); | 581 clearRingBuffers(); |
582 } | 582 } |
583 | 583 |
584 void | 584 void |
585 AudioCallbackPlaySource::preferenceChanged(PropertyContainer::PropertyName ) | 585 AudioCallbackPlaySource::preferenceChanged(PropertyContainer::PropertyName) |
586 { | 586 { |
587 } | 587 } |
588 | 588 |
589 void | 589 void |
590 AudioCallbackPlaySource::audioProcessingOverload() | 590 AudioCallbackPlaySource::audioProcessingOverload() |