changeset 866:3a3541b357fe tonioni

sampleId -> clipId
author Chris Cannam
date Tue, 07 Jan 2014 15:52:34 +0000
parents 9196cff56abe
children 42551e9c5b25
files base/PlayParameterRepository.cpp base/PlayParameterRepository.h base/PlayParameters.cpp base/PlayParameters.h base/Playable.h data/model/DenseTimeValueModel.h data/model/FlexiNoteModel.h data/model/NoteModel.h data/model/SparseOneDimensionalModel.h
diffstat 9 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- 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<PlayParameters *>(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;
     }
--- 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<const Playable *, PlayParameters *> PlayableParameterMap;
--- 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("<playparameters mute=\"%1\" pan=\"%2\" gain=\"%3\" sampleId=\"%4\" %6")
+    stream << QString("<playparameters mute=\"%1\" pan=\"%2\" gain=\"%3\" clipId=\"%4\" %6")
         .arg(m_playMuted ? "true" : "false")
         .arg(m_playPan)
         .arg(m_playGain)
-        .arg(m_playSampleId)
+        .arg(m_playClipId)
         .arg(extraAttributes);
 
     stream << ">\n";
 
-    if (m_playSampleId != "") {
+    if (m_playClipId != "") {
         // for backward compatibility
         stream << indent << "  ";
         stream << QString("<plugin identifier=\"%1\" program=\"%2\"/>\n")
             .arg("sample_player")
-            .arg(m_playSampleId);
+            .arg(m_playClipId);
     }
 
     stream << indent << "</playparameters>\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();
     }
 }
--- 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 &);
--- 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
--- 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;
 
--- 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";
     }
--- 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";
     }
--- 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";
     }