From c8eef2c4f0f9b22babc9aef9e0d4cef133475c9b Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 20 Jul 2012 17:44:01 +0100 Subject: [sndobj] Change input parameter 'mess' from char* to const char* in Set and Connect methods of analysis SndObjs. --- src/sndobj/FFT.cpp | 4 ++-- src/sndobj/FFT.h | 4 ++-- src/sndobj/IFGram.cpp | 4 ++-- src/sndobj/IFGram.h | 4 ++-- src/sndobj/PVA.cpp | 2 +- src/sndobj/PVA.h | 2 +- src/sndobj/SinAnal.cpp | 4 ++-- src/sndobj/SinAnal.h | 4 ++-- src/sndobj/SndObj.cpp | 4 ++-- src/sndobj/SndObj.h | 8 ++++---- 10 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/sndobj/FFT.cpp b/src/sndobj/FFT.cpp index 10ec76f..a0f16ae 100644 --- a/src/sndobj/FFT.cpp +++ b/src/sndobj/FFT.cpp @@ -164,7 +164,7 @@ FFT::ReInit(){ int -FFT::Set(char* mess, double value){ +FFT::Set(const char* mess, double value){ switch(FindMsg(mess)){ @@ -187,7 +187,7 @@ FFT::Set(char* mess, double value){ } int -FFT::Connect(char* mess, void *input){ +FFT::Connect(const char* mess, void *input){ switch(FindMsg(mess)){ diff --git a/src/sndobj/FFT.h b/src/sndobj/FFT.h index f8aa97e..9b8c78e 100644 --- a/src/sndobj/FFT.h +++ b/src/sndobj/FFT.h @@ -75,8 +75,8 @@ class FFT : public SndObj { int GetFFTSize() { return m_fftsize; } int GetHopSize() { return m_hopsize; } void SetWindow(Table* window){ m_table = window;} - int Connect(char* mess, void* input); - int Set(char* mess, double value); + int Connect(const char* mess, void* input); + int Set(const char* mess, double value); void SetScale(double scale){ m_scale = scale; m_norm = m_fftsize/m_scale;} virtual void SetFFTSize(int fftsize); virtual void SetHopSize(int hopsize); diff --git a/src/sndobj/IFGram.cpp b/src/sndobj/IFGram.cpp index fcd73b1..6bced21 100644 --- a/src/sndobj/IFGram.cpp +++ b/src/sndobj/IFGram.cpp @@ -60,7 +60,7 @@ IFGram::~IFGram(){ int -IFGram::Set(char* mess, double value){ +IFGram::Set(const char* mess, double value){ switch(FindMsg(mess)){ @@ -75,7 +75,7 @@ IFGram::Set(char* mess, double value){ } int -IFGram::Connect(char* mess, void* input){ +IFGram::Connect(const char* mess, void* input){ int i; diff --git a/src/sndobj/IFGram.h b/src/sndobj/IFGram.h index c404190..609ebca 100644 --- a/src/sndobj/IFGram.h +++ b/src/sndobj/IFGram.h @@ -53,8 +53,8 @@ class IFGram : public PVA { ~IFGram(); - int Set(char* mess, double value); - int Connect(char* mess, void* input); + int Set(const char* mess, double value); + int Connect(const char* mess, void* input); void SetFFTSize(int fftsize); short DoProcess(); diff --git a/src/sndobj/PVA.cpp b/src/sndobj/PVA.cpp index 59dc9c2..a1bcf0c 100644 --- a/src/sndobj/PVA.cpp +++ b/src/sndobj/PVA.cpp @@ -53,7 +53,7 @@ PVA::~PVA(){ int -PVA::Set(char* mess, double value){ +PVA::Set(const char* mess, double value){ switch(FindMsg(mess)){ diff --git a/src/sndobj/PVA.h b/src/sndobj/PVA.h index 0826f99..2088367 100644 --- a/src/sndobj/PVA.h +++ b/src/sndobj/PVA.h @@ -51,7 +51,7 @@ class PVA : public FFT { ~PVA(); double Outphases(int pos){ return m_phases[pos]; } // reads phase output. - int Set(char* mess, double value); + int Set(const char* mess, double value); void SetFFTSize(int fftsize); void SetHopSize(int hopsize); short DoProcess(); diff --git a/src/sndobj/SinAnal.cpp b/src/sndobj/SinAnal.cpp index e5c19c7..63dd7bc 100644 --- a/src/sndobj/SinAnal.cpp +++ b/src/sndobj/SinAnal.cpp @@ -311,7 +311,7 @@ SinAnal::SetIFGram(SndObj* input){ } int -SinAnal::Set(char* mess, double value){ +SinAnal::Set(const char* mess, double value){ switch(FindMsg(mess)){ case 21: SetMaxTracks((int)value); @@ -327,7 +327,7 @@ SinAnal::Set(char* mess, double value){ } int -SinAnal::Connect(char* mess, void *input){ +SinAnal::Connect(const char* mess, void *input){ switch(FindMsg(mess)){ case 3: SetIFGram((SndObj *)input); diff --git a/src/sndobj/SinAnal.h b/src/sndobj/SinAnal.h index ee46a44..51b0152 100644 --- a/src/sndobj/SinAnal.h +++ b/src/sndobj/SinAnal.h @@ -81,8 +81,8 @@ class SinAnal : public SndObj { virtual int GetTrackID(int track){ return m_trndx[track]; } virtual int GetTracks(){ return m_tracks;} - int Set(char* mess, double value); - int Connect(char* mess, void* input); + int Set(const char* mess, double value); + int Connect(const char* mess, void* input); void SetThreshold(double threshold){ m_thresh = threshold; } void SetIFGram(SndObj* input); diff --git a/src/sndobj/SndObj.cpp b/src/sndobj/SndObj.cpp index 4fbd828..c394821 100644 --- a/src/sndobj/SndObj.cpp +++ b/src/sndobj/SndObj.cpp @@ -115,7 +115,7 @@ SndObj::AddMsg(const char* mess, int ID){ } int -SndObj::Connect(char* mess, void *input){ +SndObj::Connect(const char* mess, void *input){ switch (FindMsg(mess)){ @@ -130,7 +130,7 @@ SndObj::Connect(char* mess, void *input){ } int -SndObj::Set(char* mess, double value){ +SndObj::Set(const char* mess, double value){ switch (FindMsg(mess)){ diff --git a/src/sndobj/SndObj.h b/src/sndobj/SndObj.h index f0b0f83..f22343b 100644 --- a/src/sndobj/SndObj.h +++ b/src/sndobj/SndObj.h @@ -74,7 +74,7 @@ class SndObj { msg_link *m_msgtable; - inline int FindMsg(char* mess); + inline int FindMsg(const char* mess); void AddMsg(const char* mess, int ID); #if defined (WIN) && !defined(GCC) @@ -254,8 +254,8 @@ class SndObj { void RestoreVectorSize(){ m_vecsize = m_vecsize_max; } double GetSr(){ return m_sr;} virtual void SetSr(double sr){ m_sr = sr;} - virtual int Set(char* mess, double value); - virtual int Connect(char* mess, void* input); + virtual int Set(const char* mess, double value); + virtual int Connect(const char* mess, void* input); void SetInput(SndObj* input){ @@ -276,7 +276,7 @@ class SndObj { }; int -SndObj::FindMsg(char* mess){ +SndObj::FindMsg(const char* mess){ msg_link* iter = m_msgtable; while(iter->previous && iter->msg.compare(mess)) iter = iter->previous; -- cgit v1.2.3