comparison base/PlayParameterRepository.cpp @ 83:b2067aff8cd6

* Fix crash in spectrogram layer when replacing model * Change sample player's sample path to a single sample directory. This makes it immune to OS path separator differences, and ensures it can reject configure calls that try to set a nonexistent directory. Reloading play parameters (e.g. sample program) should now work. * some win32 fixes.
author Chris Cannam
date Wed, 26 Apr 2006 16:00:13 +0000
parents bf42d8d63885
children c30728d5625c
comparison
equal deleted inserted replaced
82:bf42d8d63885 83:b2067aff8cd6
48 48
49 if (AudioGenerator::canPlay(model)) { 49 if (AudioGenerator::canPlay(model)) {
50 50
51 std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl; 51 std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl;
52 52
53 m_playParameters[model] = new PlayParameters; 53 PlayParameters *params = new PlayParameters;
54 m_playParameters[model] = params;
54 55
55 m_playParameters[model]->setPlayPluginId 56 params->setPlayPluginId
56 (AudioGenerator::getDefaultPlayPluginId(model)); 57 (AudioGenerator::getDefaultPlayPluginId(model));
57 58
58 m_playParameters[model]->setPlayPluginConfiguration 59 params->setPlayPluginConfiguration
59 (AudioGenerator::getDefaultPlayPluginConfiguration(model)); 60 (AudioGenerator::getDefaultPlayPluginConfiguration(model));
60 61
61 connect(m_playParameters[model], SIGNAL(playParametersChanged()), 62 connect(params, SIGNAL(playParametersChanged()),
62 this, SLOT(playParametersChanged())); 63 this, SLOT(playParametersChanged()));
63 64
64 connect(m_playParameters[model], SIGNAL(playPluginIdChanged(QString)), 65 connect(params, SIGNAL(playPluginIdChanged(QString)),
65 this, SLOT(playPluginIdChanged(QString))); 66 this, SLOT(playPluginIdChanged(QString)));
66 67
67 connect(m_playParameters[model], SIGNAL(playPluginConfigurationChanged(QString)), 68 connect(params, SIGNAL(playPluginConfigurationChanged(QString)),
68 this, SLOT(playPluginConfigurationChanged(QString))); 69 this, SLOT(playPluginConfigurationChanged(QString)));
70
71 std::cerr << "Connected play parameters " << params << " for model "
72 << model << " to this " << this << std::endl;
69 73
70 } else { 74 } else {
71 75
72 std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl; 76 std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl;
73 } 77 }