Mercurial > hg > svcore
comparison base/Layer.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 |
---|---|
13 #include <iostream> | 13 #include <iostream> |
14 | 14 |
15 #include "layer/LayerFactory.h" //!!! shouldn't be including this here -- does that suggest we need to move this into layer/ ? | 15 #include "layer/LayerFactory.h" //!!! shouldn't be including this here -- does that suggest we need to move this into layer/ ? |
16 #include "PlayParameterRepository.h" | 16 #include "PlayParameterRepository.h" |
17 | 17 |
18 Layer::Layer(View *w) | 18 Layer::Layer(View *w) : |
19 m_dormant(false) | |
19 { | 20 { |
20 m_view = w; | 21 m_view = w; |
21 | 22 |
22 // Subclass must call this: | 23 // Subclass must call this: |
23 // w->addLayer(this); | 24 // w->addLayer(this); |
73 | 74 |
74 return s; | 75 return s; |
75 } | 76 } |
76 | 77 |
77 PlayParameters * | 78 PlayParameters * |
78 Layer::getPlayParameters() const | 79 Layer::getPlayParameters() |
79 { | 80 { |
81 std::cerr << "Layer (" << this << ")::getPlayParameters: model is "<< getModel() << std::endl; | |
80 const Model *model = getModel(); | 82 const Model *model = getModel(); |
81 if (model) { | 83 if (model) { |
82 return PlayParameterRepository::instance()->getPlayParameters(model); | 84 return PlayParameterRepository::instance()->getPlayParameters(model); |
83 } | 85 } |
84 return 0; | 86 return 0; |
85 } | 87 } |
86 | 88 |
89 void | |
90 Layer::showLayer(bool show) | |
91 { | |
92 setLayerDormant(!show); | |
93 emit layerParametersChanged(); | |
94 } | |
87 | 95 |
88 | 96 |
89 #ifdef INCLUDE_MOCFILES | 97 #ifdef INCLUDE_MOCFILES |
90 #include "Layer.moc.cpp" | 98 #include "Layer.moc.cpp" |
91 #endif | 99 #endif |