comparison plugin/plugins/SamplePlayer.cpp @ 81:f277a171749d

* Pull out temporary directory management into its own class * Make sure playback plugins get a default sample path in their original play parameters configuration * Save play parameters to .sv file (we aren't reloading yet though)
author Chris Cannam
date Tue, 25 Apr 2006 22:14:43 +0000
parents 163f3428bbe0
children b2067aff8cd6
comparison
equal deleted inserted replaced
80:8739096929dd 81:f277a171749d
215 215
216 SamplePlayer *player = (SamplePlayer *)handle; 216 SamplePlayer *player = (SamplePlayer *)handle;
217 217
218 QMutexLocker locker(&player->m_mutex); 218 QMutexLocker locker(&player->m_mutex);
219 219
220
221 //!!! What do we do if receiving an antique path pointing at things that no longer exist?
222
220 player->m_samplePath = value; 223 player->m_samplePath = value;
221 224
222 if (player->m_sampleSearchComplete) { 225 if (player->m_sampleSearchComplete) {
223 player->m_sampleSearchComplete = false; 226 player->m_sampleSearchComplete = false;
224 player->searchSamples(); 227 player->searchSamples();
337 340
338 void 341 void
339 SamplePlayer::searchSamples() 342 SamplePlayer::searchSamples()
340 { 343 {
341 if (m_sampleSearchComplete) return; 344 if (m_sampleSearchComplete) return;
345
346 m_samples.clear();
342 347
343 std::cerr << "Current working directory is \"" << getcwd(0, 0) << "\"" << std::endl; 348 std::cerr << "Current working directory is \"" << getcwd(0, 0) << "\"" << std::endl;
344 349
345 std::cerr << "SamplePlayer::searchSamples: Path is \"" 350 std::cerr << "SamplePlayer::searchSamples: Path is \""
346 << m_samplePath.toLocal8Bit().data() << "\"" << std::endl; 351 << m_samplePath.toLocal8Bit().data() << "\"" << std::endl;