Mercurial > hg > svapp
diff audioio/AudioGenerator.cpp @ 309:71050ffd0141 tonioni
sampleId -> clipId
author | Chris Cannam |
---|---|
date | Tue, 07 Jan 2014 15:52:47 +0000 |
parents | 289d65722123 |
children | 58582119c92a |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Tue Jan 07 15:50:04 2014 +0000 +++ b/audioio/AudioGenerator.cpp Tue Jan 07 15:52:47 2014 +0000 @@ -51,9 +51,9 @@ initialiseSampleDir(); connect(PlayParameterRepository::getInstance(), - SIGNAL(playSampleIdChanged(const Playable *, QString)), + SIGNAL(playClipIdChanged(const Playable *, QString)), this, - SLOT(playSampleIdChanged(const Playable *, QString))); + SLOT(playClipIdChanged(const Playable *, QString))); } AudioGenerator::~AudioGenerator() @@ -129,11 +129,11 @@ } void -AudioGenerator::playSampleIdChanged(const Playable *playable, QString) +AudioGenerator::playClipIdChanged(const Playable *playable, QString) { const Model *model = dynamic_cast<const Model *>(playable); if (!model) { - cerr << "WARNING: AudioGenerator::playSampleIdChanged: playable " + cerr << "WARNING: AudioGenerator::playClipIdChanged: playable " << playable << " is not a supported model type" << endl; return; @@ -157,7 +157,7 @@ const Model *model = dynamic_cast<const Model *>(playable); if (!model) { - cerr << "WARNING: AudioGenerator::playSampleIdChanged: playable " + cerr << "WARNING: AudioGenerator::playClipIdChanged: playable " << playable << " is not a supported model type" << endl; return; @@ -185,7 +185,7 @@ ClipMixer * AudioGenerator::makeClipMixerFor(const Model *model) { - QString sampleId; + QString clipId; const Playable *playable = model; if (!playable || !playable->canPlay()) return 0; @@ -193,12 +193,12 @@ PlayParameters *parameters = PlayParameterRepository::getInstance()->getPlayParameters(playable); if (parameters) { - sampleId = parameters->getPlaySampleId(); + clipId = parameters->getPlayClipId(); } - std::cerr << "AudioGenerator::makeClipMixerFor(" << model << "): sample id = " << sampleId << std::endl; + std::cerr << "AudioGenerator::makeClipMixerFor(" << model << "): sample id = " << clipId << std::endl; - if (sampleId == "") { + if (clipId == "") { SVDEBUG << "AudioGenerator::makeClipMixerFor(" << model << "): no sample, skipping" << endl; return 0; } @@ -209,14 +209,14 @@ float clipF0 = Pitch::getFrequencyForPitch(60, 0, 440.0f); // required - QString clipPath = QString("%1/%2.wav").arg(m_sampleDir).arg(sampleId); + QString clipPath = QString("%1/%2.wav").arg(m_sampleDir).arg(clipId); if (!mixer->loadClipData(clipPath, clipF0)) { delete mixer; return 0; } - std::cerr << "AudioGenerator::makeClipMixerFor(" << model << "): loaded clip " << sampleId << std::endl; + std::cerr << "AudioGenerator::makeClipMixerFor(" << model << "): loaded clip " << clipId << std::endl; return mixer; }