comparison audioio/AudioCallbackPlaySource.cpp @ 29:dd2084d32652

* Create temporary directory, cleaned up on exit, and use it to store (inter alia) audio samples for the sample-player plugin. * Ensure newly added layers always have unique names * Make sure configure pairs for real-time plugins are stored in the configuration Xml along with parameter & program settings
author Chris Cannam
date Mon, 10 Apr 2006 13:52:32 +0000
parents ca4ee67b2358
children f38b8abd3540
comparison
equal deleted inserted replaced
28:ca4ee67b2358 29:dd2084d32652
86 delete m_readBuffers; 86 delete m_readBuffers;
87 } 87 }
88 88
89 delete m_writeBuffers; 89 delete m_writeBuffers;
90 90
91 delete m_audioGenerator;
92
91 m_bufferScavenger.scavenge(true); 93 m_bufferScavenger.scavenge(true);
92 } 94 }
93 95
94 void 96 void
95 AudioCallbackPlaySource::addModel(Model *model) 97 AudioCallbackPlaySource::addModel(Model *model)
115 << "New model sample rate does not match" << std::endl 117 << "New model sample rate does not match" << std::endl
116 << "existing model(s) (new " << model->getSampleRate() 118 << "existing model(s) (new " << model->getSampleRate()
117 << " vs " << m_sourceSampleRate 119 << " vs " << m_sourceSampleRate
118 << "), playback will be wrong" 120 << "), playback will be wrong"
119 << std::endl; 121 << std::endl;
120 emit sampleRateMismatch(model->getSampleRate(), m_sourceSampleRate, 122 if (dynamic_cast<DenseTimeValueModel *>(model)) {
121 false); 123 emit sampleRateMismatch(model->getSampleRate(), m_sourceSampleRate,
124 false);
125 }
122 } 126 }
123 127
124 size_t modelChannels = 1; 128 size_t modelChannels = 1;
125 DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *>(model); 129 DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *>(model);
126 if (dtvm) modelChannels = dtvm->getChannelCount(); 130 if (dtvm) modelChannels = dtvm->getChannelCount();