comparison base/PlayParameterRepository.cpp @ 57:7439f1696314

* Add editing for auralisation plugin parameters and programs * Rename and reorganise the sample plugin sample set
author Chris Cannam
date Thu, 23 Mar 2006 15:49:41 +0000
parents d397ea0a79f5
children f277a171749d
comparison
equal deleted inserted replaced
56:2157fa46c1e7 57:7439f1696314
46 46
47 std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl; 47 std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl;
48 48
49 m_playParameters[model] = new PlayParameters; 49 m_playParameters[model] = new PlayParameters;
50 50
51 m_playParameters[model]->setPlayPluginId
52 (AudioGenerator::getDefaultPlayPluginId(model));
53
54 m_playParameters[model]->setPlayPluginConfiguration
55 (AudioGenerator::getDefaultPlayPluginConfiguration(model));
56
51 connect(m_playParameters[model], SIGNAL(playParametersChanged()), 57 connect(m_playParameters[model], SIGNAL(playParametersChanged()),
52 this, SLOT(playParametersChanged())); 58 this, SLOT(playParametersChanged()));
59
60 connect(m_playParameters[model], SIGNAL(playPluginIdChanged(QString)),
61 this, SLOT(playPluginIdChanged(QString)));
62
63 connect(m_playParameters[model], SIGNAL(playPluginConfigurationChanged(QString)),
64 this, SLOT(playPluginConfigurationChanged(QString)));
53 65
54 } else { 66 } else {
55 67
56 std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl; 68 std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl;
57 } 69 }
73 } 85 }
74 86
75 void 87 void
76 PlayParameterRepository::playParametersChanged() 88 PlayParameterRepository::playParametersChanged()
77 { 89 {
78 emit playParametersChanged(dynamic_cast<PlayParameters *>(sender())); 90 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
91 emit playParametersChanged(params);
92 }
93
94 void
95 PlayParameterRepository::playPluginIdChanged(QString id)
96 {
97 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
98 for (ModelParameterMap::iterator i = m_playParameters.begin();
99 i != m_playParameters.end(); ++i) {
100 if (i->second == params) {
101 emit playPluginIdChanged(i->first, id);
102 return;
103 }
104 }
105 }
106
107 void
108 PlayParameterRepository::playPluginConfigurationChanged(QString config)
109 {
110 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
111 for (ModelParameterMap::iterator i = m_playParameters.begin();
112 i != m_playParameters.end(); ++i) {
113 if (i->second == params) {
114 emit playPluginConfigurationChanged(i->first, config);
115 return;
116 }
117 }
79 } 118 }
80 119
81 void 120 void
82 PlayParameterRepository::clear() 121 PlayParameterRepository::clear()
83 { 122 {