comparison base/PlayParameterRepository.cpp @ 29:8460b3bf8f04

* 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 4b16526b011b
children a6ef94ecbe74
comparison
equal deleted inserted replaced
28:4b16526b011b 29:8460b3bf8f04
7 This is experimental software. Not for distribution. 7 This is experimental software. Not for distribution.
8 */ 8 */
9 9
10 #include "PlayParameterRepository.h" 10 #include "PlayParameterRepository.h"
11 #include "PlayParameters.h" 11 #include "PlayParameters.h"
12
13 #include <iostream>
12 14
13 PlayParameterRepository * 15 PlayParameterRepository *
14 PlayParameterRepository::m_instance = new PlayParameterRepository; 16 PlayParameterRepository::m_instance = new PlayParameterRepository;
15 17
16 PlayParameterRepository * 18 PlayParameterRepository *
26 PlayParameters * 28 PlayParameters *
27 PlayParameterRepository::getPlayParameters(const Model *model) 29 PlayParameterRepository::getPlayParameters(const Model *model)
28 { 30 {
29 if (m_playParameters.find(model) == m_playParameters.end()) { 31 if (m_playParameters.find(model) == m_playParameters.end()) {
30 // Give all models the same type of play parameters for the moment 32 // Give all models the same type of play parameters for the moment
33 std::cerr << "Creating new PlayParameters for model " << model << std::endl;
31 m_playParameters[model] = new PlayParameters; 34 m_playParameters[model] = new PlayParameters;
35 connect(m_playParameters[model], SIGNAL(playParametersChanged()),
36 this, SLOT(playParametersChanged()));
32 } 37 }
33 38
34 return m_playParameters[model]; 39 return m_playParameters[model];
40 }
41
42 void
43 PlayParameterRepository::playParametersChanged()
44 {
45 emit playParametersChanged(dynamic_cast<PlayParameters *>(sender()));
35 } 46 }
36 47
37 void 48 void
38 PlayParameterRepository::clear() 49 PlayParameterRepository::clear()
39 { 50 {