comparison audioio/AudioCallbackPlaySource.cpp @ 12:29b38a641d43

* Implement play mute, level and pan controls and a layer visibility control * Handle swapping the buffers in AudioCallbackPlaySource more gracefully, so that in many cases it can be done inaudibly. Still gets it wrong when playing in a noncontiguous selection. * Fix to SV file save for non-2d sparse models * Fixes to LED button drawing and AudioDial mouse functionality * Add progress bar for Ogg file import * Reshuffle PropertyContainer and its subclasses so it can be a QObject * Add layer dormancy (invisible layer permitted to free its cache space) * Optimisations to SpectrogramLayer, removing locks when reading/writing individual pixels in the cache (should be unnecessary there) -- there's still an issue here as we need a lock when reading from the model in case the model is replaced, and we don't currently have one * Several munlock() calls to make it harder to exhaust real memory if running in an RT mode with mlockall() active
author Chris Cannam
date Fri, 17 Feb 2006 18:04:26 +0000
parents b6dc944128da
children 89bb89894ad6
comparison
equal deleted inserted replaced
11:8dc0ae8fccdd 12:29b38a641d43
11 11
12 #include "AudioGenerator.h" 12 #include "AudioGenerator.h"
13 13
14 #include "base/Model.h" 14 #include "base/Model.h"
15 #include "base/ViewManager.h" 15 #include "base/ViewManager.h"
16 #include "base/PlayParameterRepository.h"
16 #include "model/DenseTimeValueModel.h" 17 #include "model/DenseTimeValueModel.h"
17 #include "model/SparseOneDimensionalModel.h" 18 #include "model/SparseOneDimensionalModel.h"
18 #include "dsp/timestretching/IntegerTimeStretcher.h" 19 #include "dsp/timestretching/IntegerTimeStretcher.h"
19 20
20 #include <iostream> 21 #include <iostream>
52 this, SLOT(selectionChanged())); 53 this, SLOT(selectionChanged()));
53 connect(m_viewManager, SIGNAL(playLoopModeChanged()), 54 connect(m_viewManager, SIGNAL(playLoopModeChanged()),
54 this, SLOT(playLoopModeChanged())); 55 this, SLOT(playLoopModeChanged()));
55 connect(m_viewManager, SIGNAL(playSelectionModeChanged()), 56 connect(m_viewManager, SIGNAL(playSelectionModeChanged()),
56 this, SLOT(playSelectionModeChanged())); 57 this, SLOT(playSelectionModeChanged()));
58
59 connect(PlayParameterRepository::instance(),
60 SIGNAL(playParametersChanged(PlayParameters *)),
61 this, SLOT(playParametersChanged(PlayParameters *)));
57 } 62 }
58 63
59 AudioCallbackPlaySource::~AudioCallbackPlaySource() 64 AudioCallbackPlaySource::~AudioCallbackPlaySource()
60 { 65 {
61 m_exiting = true; 66 m_exiting = true;
305 AudioCallbackPlaySource::playSelectionModeChanged() 310 AudioCallbackPlaySource::playSelectionModeChanged()
306 { 311 {
307 if (!m_viewManager->getSelections().empty()) { 312 if (!m_viewManager->getSelections().empty()) {
308 clearRingBuffers(); 313 clearRingBuffers();
309 } 314 }
315 }
316
317 void
318 AudioCallbackPlaySource::playParametersChanged(PlayParameters *params)
319 {
320 clearRingBuffers();
310 } 321 }
311 322
312 void 323 void
313 AudioCallbackPlaySource::setTargetBlockSize(size_t size) 324 AudioCallbackPlaySource::setTargetBlockSize(size_t size)
314 { 325 {