comparison base/PlayParameterRepository.cpp @ 866:3a3541b357fe tonioni

sampleId -> clipId
author Chris Cannam
date Tue, 07 Jan 2014 15:52:34 +0000
parents 1f98e28f70c6
children ad14e7ed096d
comparison
equal deleted inserted replaced
865:9196cff56abe 866:3a3541b357fe
45 cerr << "PlayParameterRepository:addPlayable: Adding play parameters for " << playable << endl; 45 cerr << "PlayParameterRepository:addPlayable: Adding play parameters for " << playable << endl;
46 46
47 PlayParameters *params = new PlayParameters; 47 PlayParameters *params = new PlayParameters;
48 m_playParameters[playable] = params; 48 m_playParameters[playable] = params;
49 49
50 params->setPlaySampleId 50 params->setPlayClipId
51 (playable->getDefaultPlaySampleId()); 51 (playable->getDefaultPlayClipId());
52 52
53 connect(params, SIGNAL(playParametersChanged()), 53 connect(params, SIGNAL(playParametersChanged()),
54 this, SLOT(playParametersChanged())); 54 this, SLOT(playParametersChanged()));
55 55
56 connect(params, SIGNAL(playSampleIdChanged(QString)), 56 connect(params, SIGNAL(playClipIdChanged(QString)),
57 this, SLOT(playSampleIdChanged(QString))); 57 this, SLOT(playClipIdChanged(QString)));
58 58
59 cerr << "Connected play parameters " << params << " for playable " 59 cerr << "Connected play parameters " << params << " for playable "
60 << playable << " to this " << this << endl; 60 << playable << " to this " << this << endl;
61 } 61 }
62 } 62 }
99 PlayParameters *params = dynamic_cast<PlayParameters *>(sender()); 99 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
100 emit playParametersChanged(params); 100 emit playParametersChanged(params);
101 } 101 }
102 102
103 void 103 void
104 PlayParameterRepository::playSampleIdChanged(QString id) 104 PlayParameterRepository::playClipIdChanged(QString id)
105 { 105 {
106 PlayParameters *params = dynamic_cast<PlayParameters *>(sender()); 106 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
107 for (PlayableParameterMap::iterator i = m_playParameters.begin(); 107 for (PlayableParameterMap::iterator i = m_playParameters.begin();
108 i != m_playParameters.end(); ++i) { 108 i != m_playParameters.end(); ++i) {
109 if (i->second == params) { 109 if (i->second == params) {
110 emit playSampleIdChanged(i->first, id); 110 emit playClipIdChanged(i->first, id);
111 return; 111 return;
112 } 112 }
113 } 113 }
114 } 114 }
115 115
153 { 153 {
154 m_to.setPlayGain(gain); 154 m_to.setPlayGain(gain);
155 } 155 }
156 156
157 void 157 void
158 PlayParameterRepository::EditCommand::setPlaySampleId(QString id) 158 PlayParameterRepository::EditCommand::setPlayClipId(QString id)
159 { 159 {
160 m_to.setPlaySampleId(id); 160 m_to.setPlayClipId(id);
161 } 161 }
162 162
163 void 163 void
164 PlayParameterRepository::EditCommand::execute() 164 PlayParameterRepository::EditCommand::execute()
165 { 165 {
193 if (m_to.getPlayPan() != m_from.getPlayPan()) { 193 if (m_to.getPlayPan() != m_from.getPlayPan()) {
194 name = tr("Change Playback Pan"); 194 name = tr("Change Playback Pan");
195 if (++changed > 1) return multiname; 195 if (++changed > 1) return multiname;
196 } 196 }
197 197
198 if (m_to.getPlaySampleId() != m_from.getPlaySampleId()) { 198 if (m_to.getPlayClipId() != m_from.getPlayClipId()) {
199 name = tr("Change Playback Sample"); 199 name = tr("Change Playback Sample");
200 if (++changed > 1) return multiname; 200 if (++changed > 1) return multiname;
201 } 201 }
202 202
203 if (name == "") return multiname; 203 if (name == "") return multiname;