# HG changeset patch # User Chris Cannam # Date 1389109954 0 # Node ID 3a3541b357fe504ee7083410bbd7c63791667632 # Parent 9196cff56abe5793706b7c69aa816c4aeebe92e3 sampleId -> clipId diff -r 9196cff56abe -r 3a3541b357fe base/PlayParameterRepository.cpp --- a/base/PlayParameterRepository.cpp Tue Jan 07 15:49:39 2014 +0000 +++ b/base/PlayParameterRepository.cpp Tue Jan 07 15:52:34 2014 +0000 @@ -47,14 +47,14 @@ PlayParameters *params = new PlayParameters; m_playParameters[playable] = params; - params->setPlaySampleId - (playable->getDefaultPlaySampleId()); + params->setPlayClipId + (playable->getDefaultPlayClipId()); connect(params, SIGNAL(playParametersChanged()), this, SLOT(playParametersChanged())); - connect(params, SIGNAL(playSampleIdChanged(QString)), - this, SLOT(playSampleIdChanged(QString))); + connect(params, SIGNAL(playClipIdChanged(QString)), + this, SLOT(playClipIdChanged(QString))); cerr << "Connected play parameters " << params << " for playable " << playable << " to this " << this << endl; @@ -101,13 +101,13 @@ } void -PlayParameterRepository::playSampleIdChanged(QString id) +PlayParameterRepository::playClipIdChanged(QString id) { PlayParameters *params = dynamic_cast(sender()); for (PlayableParameterMap::iterator i = m_playParameters.begin(); i != m_playParameters.end(); ++i) { if (i->second == params) { - emit playSampleIdChanged(i->first, id); + emit playClipIdChanged(i->first, id); return; } } @@ -155,9 +155,9 @@ } void -PlayParameterRepository::EditCommand::setPlaySampleId(QString id) +PlayParameterRepository::EditCommand::setPlayClipId(QString id) { - m_to.setPlaySampleId(id); + m_to.setPlayClipId(id); } void @@ -195,7 +195,7 @@ if (++changed > 1) return multiname; } - if (m_to.getPlaySampleId() != m_from.getPlaySampleId()) { + if (m_to.getPlayClipId() != m_from.getPlayClipId()) { name = tr("Change Playback Sample"); if (++changed > 1) return multiname; } diff -r 9196cff56abe -r 3a3541b357fe base/PlayParameterRepository.h --- a/base/PlayParameterRepository.h Tue Jan 07 15:49:39 2014 +0000 +++ b/base/PlayParameterRepository.h Tue Jan 07 15:52:34 2014 +0000 @@ -51,7 +51,7 @@ void setPlayAudible(bool); void setPlayPan(float); void setPlayGain(float); - void setPlaySampleId(QString); + void setPlayClipId(QString); void execute(); void unexecute(); QString getName() const; @@ -64,11 +64,11 @@ signals: void playParametersChanged(PlayParameters *); - void playSampleIdChanged(const Playable *, QString); + void playClipIdChanged(const Playable *, QString); protected slots: void playParametersChanged(); - void playSampleIdChanged(QString); + void playClipIdChanged(QString); protected: typedef std::map PlayableParameterMap; diff -r 9196cff56abe -r 3a3541b357fe base/PlayParameters.cpp --- a/base/PlayParameters.cpp Tue Jan 07 15:49:39 2014 +0000 +++ b/base/PlayParameters.cpp Tue Jan 07 15:52:34 2014 +0000 @@ -43,9 +43,9 @@ changed = true; } - if (m_playSampleId != pp->getPlaySampleId()) { - m_playSampleId = pp->getPlaySampleId(); - emit playSampleIdChanged(m_playSampleId); + if (m_playClipId != pp->getPlayClipId()) { + m_playClipId = pp->getPlayClipId(); + emit playClipIdChanged(m_playClipId); changed = true; } @@ -58,21 +58,21 @@ QString extraAttributes) const { stream << indent; - stream << QString("\n"; - if (m_playSampleId != "") { + if (m_playClipId != "") { // for backward compatibility stream << indent << " "; stream << QString("\n") .arg("sample_player") - .arg(m_playSampleId); + .arg(m_playClipId); } stream << indent << "\n"; @@ -118,11 +118,11 @@ } void -PlayParameters::setPlaySampleId(QString id) +PlayParameters::setPlayClipId(QString id) { - if (m_playSampleId != id) { - m_playSampleId = id; - emit playSampleIdChanged(id); + if (m_playClipId != id) { + m_playClipId = id; + emit playClipIdChanged(id); emit playParametersChanged(); } } diff -r 9196cff56abe -r 3a3541b357fe base/PlayParameters.h --- a/base/PlayParameters.h Tue Jan 07 15:49:39 2014 +0000 +++ b/base/PlayParameters.h Tue Jan 07 15:52:34 2014 +0000 @@ -32,7 +32,7 @@ virtual float getPlayPan() const { return m_playPan; } // -1.0 -> 1.0 virtual float getPlayGain() const { return m_playGain; } - virtual QString getPlaySampleId() const { return m_playSampleId; } + virtual QString getPlayClipId() const { return m_playClipId; } virtual void copyFrom(const PlayParameters *); @@ -45,7 +45,7 @@ virtual void setPlayAudible(bool nonMuted); virtual void setPlayPan(float pan); virtual void setPlayGain(float gain); - virtual void setPlaySampleId(QString id); + virtual void setPlayClipId(QString id); signals: void playParametersChanged(); @@ -53,13 +53,13 @@ void playAudibleChanged(bool); void playPanChanged(float); void playGainChanged(float); - void playSampleIdChanged(QString); + void playClipIdChanged(QString); protected: bool m_playMuted; float m_playPan; float m_playGain; - QString m_playSampleId; + QString m_playClipId; private: PlayParameters(const PlayParameters &); diff -r 9196cff56abe -r 3a3541b357fe base/Playable.h --- a/base/Playable.h Tue Jan 07 15:49:39 2014 +0000 +++ b/base/Playable.h Tue Jan 07 15:52:34 2014 +0000 @@ -24,7 +24,7 @@ virtual ~Playable() { } virtual bool canPlay() const { return false; } - virtual QString getDefaultPlaySampleId() const { return ""; } + virtual QString getDefaultPlayClipId() const { return ""; } }; #endif diff -r 9196cff56abe -r 3a3541b357fe data/model/DenseTimeValueModel.h --- a/data/model/DenseTimeValueModel.h Tue Jan 07 15:49:39 2014 +0000 +++ b/data/model/DenseTimeValueModel.h Tue Jan 07 15:52:34 2014 +0000 @@ -85,7 +85,7 @@ float **buffers) const = 0; virtual bool canPlay() const { return true; } - virtual QString getDefaultPlaySampleId() const { return ""; } + virtual QString getDefaultPlayClipId() const { return ""; } virtual QString toDelimitedDataString(QString delimiter, size_t f0, size_t f1) const; diff -r 9196cff56abe -r 3a3541b357fe data/model/FlexiNoteModel.h --- a/data/model/FlexiNoteModel.h Tue Jan 07 15:49:39 2014 +0000 +++ b/data/model/FlexiNoteModel.h Tue Jan 07 15:52:34 2014 +0000 @@ -135,7 +135,7 @@ virtual bool canPlay() const { return true; } - virtual QString getDefaultPlaySampleId() const + virtual QString getDefaultPlayClipId() const { return "click"; } diff -r 9196cff56abe -r 3a3541b357fe data/model/NoteModel.h --- a/data/model/NoteModel.h Tue Jan 07 15:49:39 2014 +0000 +++ b/data/model/NoteModel.h Tue Jan 07 15:52:34 2014 +0000 @@ -129,7 +129,7 @@ virtual bool canPlay() const { return true; } - virtual QString getDefaultPlaySampleId() const + virtual QString getDefaultPlayClipId() const { return "piano"; } diff -r 9196cff56abe -r 3a3541b357fe data/model/SparseOneDimensionalModel.h --- a/data/model/SparseOneDimensionalModel.h Tue Jan 07 15:49:39 2014 +0000 +++ b/data/model/SparseOneDimensionalModel.h Tue Jan 07 15:52:34 2014 +0000 @@ -90,7 +90,7 @@ virtual bool canPlay() const { return true; } - virtual QString getDefaultPlaySampleId() const + virtual QString getDefaultPlayClipId() const { return "tap"; }