# HG changeset patch # User lbajardsilogic # Date 1206456876 0 # Node ID 2aea571dc9d4be75141ceefaee878dbfe8d2a31a # Parent e006f4a57f866447beceb60575eeaade0c7820ad remove AirWorm remove mutex lock in destructor of Equalizer (bug) diff -r e006f4a57f86 -r 2aea571dc9d4 sv/filter/EqualizerFilter.cpp --- a/sv/filter/EqualizerFilter.cpp Tue Mar 11 13:53:59 2008 +0000 +++ b/sv/filter/EqualizerFilter.cpp Tue Mar 25 14:54:36 2008 +0000 @@ -57,8 +57,8 @@ } else { - for(int i = 0 ; i < m_resolution ; i++){ - m_eqcurve.push_back(0); + for(int i = 0 ; i < m_resolution ; i++){ + m_eqcurve.push_back(0); } } m_mutex->unlock(); @@ -68,14 +68,16 @@ EqualizerFilter::~EqualizerFilter() { - m_mutex->lock(); m_eqcurve.clear(); - m_mutex->unlock(); - + for(int i = 0 ; i < m_nbBand ; i++){ delete band[i]; } delete band; + band = 0; + + delete m_plotbandcurve; + m_plotbandcurve = 0; } EqualizerFilter::PropertyList EqualizerFilter::getProperties() const @@ -107,13 +109,13 @@ if (name.left(8) == "GainBand") return RangeProperty; return InvalidProperty; } - -QString EqualizerFilter::getPropertyGroupName(const PropertyName &name) const -{ - if (name.left(8) == "GainBand") return "GainBand"; + +QString EqualizerFilter::getPropertyGroupName(const PropertyName &name) const +{ + if (name.left(8) == "GainBand") return "GainBand"; if ((name == "Equalizer") || (name == "DrawCurve")) return "Draw Curve"; - return QString(); -} + return QString(); +} int EqualizerFilter::getPropertyRangeAndValue(const PropertyName &name, int *min, int *max, int *deflt) const diff -r e006f4a57f86 -r 2aea571dc9d4 sv/filter/EqualizerFilter.h --- a/sv/filter/EqualizerFilter.h Tue Mar 11 13:53:59 2008 +0000 +++ b/sv/filter/EqualizerFilter.h Tue Mar 25 14:54:36 2008 +0000 @@ -15,81 +15,81 @@ License, or (at your option) any later version. See the file COPYING included with this distribution for more information. */ - -#ifndef _EQUALIZER_FILTER_H_ -#define _EQUALIZER_FILTER_H_ - -#include - -#include "base/PropertyContainer.h" - -class EqualizerFilter : public PropertyContainer -{ - Q_OBJECT - -public: - EqualizerFilter(size_t framesize, QMutex *mutex); - virtual ~EqualizerFilter(); - - virtual QString getPropertyContainerIconName() const {return "";} - - virtual QString getPropertyContainerName() const {return "Time and Pitch filter";} - - virtual QString getPropertyGroupName(const PropertyName &) const; - - virtual PropertyList getProperties() const; - virtual QString getPropertyLabel(const PropertyName &) const; - virtual PropertyType getPropertyType(const PropertyName &) const; - virtual int getPropertyRangeAndValue(const PropertyName &, - int *min, int *max, int *deflt) const; - virtual QString getPropertyValueLabel(const PropertyName &, - int value) const; - - virtual void setProperty(const PropertyName &, int value); - virtual void setProperty(const PropertyName &, QVector value); - - inline bool isEnabled() {return m_enabled;} - - inline bool bypass() {return !m_enabled;} - inline bool simpleMode() {return m_simpleMode;} - inline int* gainband() {return m_gainband;} - - inline QVector& curve() {return m_eqcurve;} - - void emitPlotFFTArray(float *signal, int framesize); - - void create_filterbands(); - -signals: - void filterEnabled(bool); - void signalChanged(float *); - void filterChanged(float *); - void enableDrawCurve(bool); - -public slots : - void setFilterEnabled(bool b); - void setFilterEnabled(int b); - -protected: - - QVector m_eqcurve; - float* m_curve; - float* m_plotbandcurve; - - bool m_enabled; - - bool m_simpleMode; - - int m_gainband[5]; - int m_nbBand; - - int m_resolution; - - float **band; - - size_t m_framesize; - - QMutex * m_mutex; -}; - + +#ifndef _EQUALIZER_FILTER_H_ +#define _EQUALIZER_FILTER_H_ + +#include + +#include "base/PropertyContainer.h" + +class EqualizerFilter : public PropertyContainer +{ + Q_OBJECT + +public: + EqualizerFilter(size_t framesize, QMutex *mutex); + virtual ~EqualizerFilter(); + + virtual QString getPropertyContainerIconName() const {return "";} + + virtual QString getPropertyContainerName() const {return "Time and Pitch filter";} + + virtual QString getPropertyGroupName(const PropertyName &) const; + + virtual PropertyList getProperties() const; + virtual QString getPropertyLabel(const PropertyName &) const; + virtual PropertyType getPropertyType(const PropertyName &) const; + virtual int getPropertyRangeAndValue(const PropertyName &, + int *min, int *max, int *deflt) const; + virtual QString getPropertyValueLabel(const PropertyName &, + int value) const; + + virtual void setProperty(const PropertyName &, int value); + virtual void setProperty(const PropertyName &, QVector value); + + inline bool isEnabled() {return m_enabled;} + + inline bool bypass() {return !m_enabled;} + inline bool simpleMode() {return m_simpleMode;} + inline int* gainband() {return m_gainband;} + + inline QVector& curve() {return m_eqcurve;} + + void emitPlotFFTArray(float *signal, int framesize); + + void create_filterbands(); + +signals: + void filterEnabled(bool); + void signalChanged(float *); + void filterChanged(float *); + void enableDrawCurve(bool); + +public slots : + void setFilterEnabled(bool b); + void setFilterEnabled(int b); + +protected: + + QVector m_eqcurve; + float* m_curve; + float* m_plotbandcurve; + + bool m_enabled; + + bool m_simpleMode; + + int m_gainband[5]; + int m_nbBand; + + int m_resolution; + + float **band; + + size_t m_framesize; + + QMutex * m_mutex; +}; + #endif \ No newline at end of file diff -r e006f4a57f86 -r 2aea571dc9d4 sv/filter/MultiRealTimeFilter.cpp --- a/sv/filter/MultiRealTimeFilter.cpp Tue Mar 11 13:53:59 2008 +0000 +++ b/sv/filter/MultiRealTimeFilter.cpp Tue Mar 25 14:54:36 2008 +0000 @@ -167,6 +167,7 @@ emit playSpeedChanged(1); delete m_mutex; + m_mutex = 0; /***************************/ } diff -r e006f4a57f86 -r 2aea571dc9d4 sv/sound_access.vcproj --- a/sv/sound_access.vcproj Tue Mar 11 13:53:59 2008 +0000 +++ b/sv/sound_access.vcproj Tue Mar 25 14:54:36 2008 +0000 @@ -309,10 +309,6 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" > - - @@ -509,32 +505,6 @@ Name="Moc" > - - - - - - - - - -