From: <pst...@us...> - 2010-04-28 23:14:14
|
Revision: 775 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=775&view=rev Author: pstieber Date: 2010-04-28 23:14:07 +0000 (Wed, 28 Apr 2010) Log Message: ----------- Massive curly bracket style update. Modified Paths: -------------- trunk/jazz/src/AlsaDriver.h trunk/jazz/src/AlsaPlayer.h trunk/jazz/src/Command.cpp trunk/jazz/src/ControlEdit.h trunk/jazz/src/DeprecatedWx/prop.cpp trunk/jazz/src/DeprecatedWx/prop.h trunk/jazz/src/DeprecatedWx/propform.h trunk/jazz/src/DeprecatedWx/proplist.h trunk/jazz/src/Dialogs/copyright.cpp trunk/jazz/src/Dialogs/midiThruDialog.cpp trunk/jazz/src/DynamicArray.h trunk/jazz/src/Events.h trunk/jazz/src/Harmony.cpp trunk/jazz/src/HarmonyBrowserAnalyzer.cpp trunk/jazz/src/HarmonyP.cpp trunk/jazz/src/PianoFrame.cpp trunk/jazz/src/Player.h trunk/jazz/src/Random.h trunk/jazz/src/ResourceDialog.h trunk/jazz/src/Rhythm.h trunk/jazz/src/Sample.h trunk/jazz/src/SampleCommand.h trunk/jazz/src/SampleDialog.cpp trunk/jazz/src/SampleDialog.h trunk/jazz/src/SampleWindow.cpp trunk/jazz/src/SampleWindow.h trunk/jazz/src/Signal2.h trunk/jazz/src/Synth.cpp trunk/jazz/src/Synth.h trunk/jazz/src/Track.h trunk/jazz/src/gui/trackwinEnum.h trunk/jazz/src/mswin/WindowsMidiInterface.cpp trunk/jazz/src/mswin/WindowsMidiInterface.h trunk/jazz/src/mswin/WindowsPlayer.h Modified: trunk/jazz/src/AlsaDriver.h =================================================================== --- trunk/jazz/src/AlsaDriver.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/AlsaDriver.h 2010-04-28 23:14:07 UTC (rev 775) @@ -47,8 +47,14 @@ { return mInstalled && tAlsaPlayer::IsInstalled(); } - virtual int GetAudioEnabled() const { return audio_enabled; } - virtual void SetAudioEnabled(int x) { audio_enabled = x; } + virtual int GetAudioEnabled() const + { + return audio_enabled; + } + virtual void SetAudioEnabled(int x) + { + audio_enabled = x; + } virtual void ListenAudio(int key, int start_stop_mode = 1); virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl); virtual bool IsListening() const Modified: trunk/jazz/src/AlsaPlayer.h =================================================================== --- trunk/jazz/src/AlsaPlayer.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/AlsaPlayer.h 2010-04-28 23:14:07 UTC (rev 775) @@ -52,8 +52,14 @@ void Notify(); bool IsInstalled(); int OutEvent(JZEvent *e, int now); - int OutEvent(JZEvent *e) { return OutEvent(e, 0); } - void OutNow(JZEvent *e) { OutEvent(e, 1); } + int OutEvent(JZEvent *e) + { + return OutEvent(e, 0); + } + void OutNow(JZEvent *e) + { + OutEvent(e, 1); + } void OutNow(tParam *r); void OutBreak(); void OutBreak(long BreakOver); @@ -61,11 +67,26 @@ void StopPlay(); long GetRealTimeClock(); virtual void SetSoftThru(int on, int idev, int odev); - virtual int SupportsMultipleDevices() { return 1; } - virtual tDeviceList & GetOutputDevices() { return oaddr; } - virtual tDeviceList & GetInputDevices() { return iaddr; } - virtual int GetThruInputDevice() { return ithru; } - virtual int GetThruOutputDevice() { return othru; } + virtual int SupportsMultipleDevices() + { + return 1; + } + virtual tDeviceList & GetOutputDevices() + { + return oaddr; + } + virtual tDeviceList & GetInputDevices() + { + return iaddr; + } + virtual int GetThruInputDevice() + { + return ithru; + } + virtual int GetThruOutputDevice() + { + return othru; + } int FindMidiDevice(); protected: @@ -94,7 +115,11 @@ unsigned DeviceCapabilities); int select_list(tAlsaDeviceList &list, const char *title, int def_device); int start_timer(long clock); - int write(snd_seq_event_t *ev) { return write(ev, 0); } // 0 == ok + int write(snd_seq_event_t *ev) + { + // 0 == ok + return write(ev, 0); + } int write(snd_seq_event_t *ev, int now); // 0 == ok void set_event_header(snd_seq_event_t *ev, long clock, int type); void set_event_header(snd_seq_event_t *ev, long clock, int len, void *ptr); Modified: trunk/jazz/src/Command.cpp =================================================================== --- trunk/jazz/src/Command.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Command.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -1099,7 +1099,7 @@ JZKeyOnEvent* pKeyOn = (JZKeyOnEvent *)pEvent->Copy(); int n_th = 0; - // the n'th key from bottom + // the n'th key from bottom for (i = 0; i <= pKeyOn->GetKey(); i++) { n_th += Keys[i]; Modified: trunk/jazz/src/ControlEdit.h =================================================================== --- trunk/jazz/src/ControlEdit.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/ControlEdit.h 2010-04-28 23:14:07 UTC (rev 775) @@ -98,7 +98,10 @@ virtual int GetValue(JZEvent *e) = 0; - virtual JZEvent* NewEvent(long clock, int val) { return 0; } + virtual JZEvent* NewEvent(long clock, int val) + { + return 0; + } virtual void OnApply(); virtual void OnRevert(); Modified: trunk/jazz/src/DeprecatedWx/prop.cpp =================================================================== --- trunk/jazz/src/DeprecatedWx/prop.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/DeprecatedWx/prop.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -1226,20 +1226,24 @@ wxPropertyValidator::~wxPropertyValidator(void) {} -bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) { +bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) +{ double num; bool ok = StringToDouble (s, &num); *number = (float) num; return ok; } -bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) { +bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) +{ bool ok = true; wxChar *value_ptr; *number = wxStrtod (s, &value_ptr); - if (value_ptr) { + if (value_ptr) + { int len = wxStrlen (value_ptr); - for (int i = 0; i < len; i++) { + for (int i = 0; i < len; i++) + { ok = (wxIsspace (value_ptr[i]) != 0); if (!ok) return false; } @@ -1247,20 +1251,24 @@ return ok; } -bool wxPropertyValidator::StringToInt (wxChar *s, int *number) { +bool wxPropertyValidator::StringToInt (wxChar *s, int *number) +{ long num; bool ok = StringToLong (s, &num); *number = (int) num; return ok; } -bool wxPropertyValidator::StringToLong (wxChar *s, long *number) { +bool wxPropertyValidator::StringToLong (wxChar *s, long *number) +{ bool ok = true; wxChar *value_ptr; *number = wxStrtol (s, &value_ptr, 10); - if (value_ptr) { + if (value_ptr) + { int len = wxStrlen (value_ptr); - for (int i = 0; i < len; i++) { + for (int i = 0; i < len; i++) + { ok = (wxIsspace (value_ptr[i]) != 0); if (!ok) return false; } @@ -1268,26 +1276,30 @@ return ok; } -wxChar *wxPropertyValidator::FloatToString (float number) { +wxChar *wxPropertyValidator::FloatToString (float number) +{ static wxChar buf[20]; wxSnprintf (buf, 20, wxT("%.6g"), number); return buf; } -wxChar *wxPropertyValidator::DoubleToString (double number) { +wxChar *wxPropertyValidator::DoubleToString (double number) +{ static wxChar buf[20]; wxSnprintf (buf, 20, wxT("%.6g"), number); return buf; } -wxChar *wxPropertyValidator::IntToString (int number) { +wxChar *wxPropertyValidator::IntToString (int number) +{ static wxChar buf[20]; wxSprintf (buf, wxT("%d"), number); return buf; } -wxChar *wxPropertyValidator::LongToString (long number) { +wxChar *wxPropertyValidator::LongToString (long number) +{ static wxChar buf[20]; wxSprintf (buf, wxT("%ld"), number); Modified: trunk/jazz/src/DeprecatedWx/prop.h =================================================================== --- trunk/jazz/src/DeprecatedWx/prop.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/DeprecatedWx/prop.h 2010-04-28 23:14:07 UTC (rev 775) @@ -112,15 +112,22 @@ ~wxPropertyView(); // Associates and shows the view - virtual void ShowView(wxPropertySheet *WXUNUSED(propertySheet), wxWindow *WXUNUSED(panel)) {} + virtual void ShowView(wxPropertySheet *WXUNUSED(propertySheet), wxWindow *WXUNUSED(panel)) + { + } // Update this view of the viewed object, called e.g. by // the object itself. - virtual bool OnUpdateView() {return false;}; + virtual bool OnUpdateView() + { + return false; + } // Override this to do something as soon as the property changed, // if the view and validators support it. - virtual void OnPropertyChanged(wxProperty *WXUNUSED(property)) {} + virtual void OnPropertyChanged(wxProperty *WXUNUSED(property)) + { + } virtual void AddRegistry(wxPropertyValidatorRegistry *registry); inline @@ -175,9 +182,18 @@ wxPropertyValidator(long flags = 0); ~wxPropertyValidator(); - inline long GetFlags() const { return m_validatorFlags; } - inline void SetValidatorProperty(wxProperty *prop) { m_validatorProperty = prop; } - inline wxProperty *GetValidatorProperty(void) const { return m_validatorProperty; } + inline long GetFlags() const + { + return m_validatorFlags; + } + inline void SetValidatorProperty(wxProperty *prop) + { + m_validatorProperty = prop; + } + inline wxProperty *GetValidatorProperty(void) const + { + return m_validatorProperty; + } virtual bool StringToFloat (wxChar *s, float *number); virtual bool StringToDouble (wxChar *s, double *number); @@ -226,19 +242,20 @@ * Property value class */ -typedef enum { - wxPropertyValueNull, - wxPropertyValueInteger, - wxPropertyValueReal, - wxPropertyValuebool, - wxPropertyValueString, - wxPropertyValueList, - wxPropertyValueIntegerPtr, - wxPropertyValueLongPtr, - wxPropertyValueRealPtr, - wxPropertyValueDoublePtr, - wxPropertyValueboolPtr, - wxPropertyValueStringPtr +typedef enum +{ + wxPropertyValueNull, + wxPropertyValueInteger, + wxPropertyValueReal, + wxPropertyValuebool, + wxPropertyValueString, + wxPropertyValueList, + wxPropertyValueIntegerPtr, + wxPropertyValueLongPtr, + wxPropertyValueRealPtr, + wxPropertyValueDoublePtr, + wxPropertyValueboolPtr, + wxPropertyValueStringPtr } wxPropertyValueType; class wxPropertyValue: public wxObject @@ -266,8 +283,14 @@ ~wxPropertyValue(void); - virtual inline wxPropertyValueType Type(void) const { return m_type; } - virtual inline void SetType(wxPropertyValueType typ) { m_type = typ; } + virtual inline wxPropertyValueType Type(void) const + { + return m_type; + } + virtual inline void SetType(wxPropertyValueType typ) + { + m_type = typ; + } virtual long IntegerValue(void) const; virtual float RealValue(void) const; virtual bool BoolValue(void) const; @@ -316,13 +339,25 @@ // Clear list virtual void ClearList(void); - virtual inline void SetClientData(wxObject *data) { m_clientData = data; } - virtual inline wxObject *GetClientData(void) { return m_clientData; } + virtual inline void SetClientData(wxObject *data) + { + m_clientData = data; + } + virtual inline wxObject *GetClientData(void) + { + return m_clientData; + } virtual wxString GetStringRepresentation(void); - inline void SetModified(bool flag = true) { m_modifiedFlag = flag; } - inline bool GetModified(void) { return m_modifiedFlag; } + inline void SetModified(bool flag = true) + { + m_modifiedFlag = flag; + } + inline bool GetModified(void) + { + return m_modifiedFlag; + } // Operators void operator=(const wxPropertyValue& val); @@ -343,7 +378,8 @@ wxPropertyValueType m_type; bool m_modifiedFlag; - union { + union + { long integer; // Also doubles as bool wxChar* string; float real; @@ -392,11 +428,23 @@ virtual void SetName(wxString& nm); virtual void SetRole(wxString& role); void operator=(const wxPropertyValue& val); - virtual inline void SetWindow(wxWindow *win) { m_propertyWindow = win; } - virtual inline wxWindow *GetWindow(void) const { return m_propertyWindow; } + virtual inline void SetWindow(wxWindow *win) + { + m_propertyWindow = win; + } + virtual inline wxWindow *GetWindow(void) const + { + return m_propertyWindow; + } - inline void Enable(bool en) { m_enabled = en; } - inline bool IsEnabled(void) const { return m_enabled; } + inline void Enable(bool en) + { + m_enabled = en; + } + inline bool IsEnabled(void) const + { + return m_enabled; + } }; inline Modified: trunk/jazz/src/DeprecatedWx/propform.h =================================================================== --- trunk/jazz/src/DeprecatedWx/propform.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/DeprecatedWx/propform.h 2010-04-28 23:14:07 UTC (rev 775) @@ -74,15 +74,36 @@ // Extend event processing to process OnCommand virtual bool ProcessEvent(wxEvent& event); - inline virtual void AssociatePanel(wxWindow *win) { m_propertyWindow = win; } - inline virtual wxWindow *GetPanel(void) const { return m_propertyWindow; } + inline virtual void AssociatePanel(wxWindow *win) + { + m_propertyWindow = win; + } + inline virtual wxWindow *GetPanel(void) const + { + return m_propertyWindow; + } - inline virtual void SetManagedWindow(wxWindow *win) { m_managedWindow = win; } - inline virtual wxWindow *GetManagedWindow(void) const { return m_managedWindow; } + inline virtual void SetManagedWindow(wxWindow *win) + { + m_managedWindow = win; + } + inline virtual wxWindow *GetManagedWindow(void) const + { + return m_managedWindow; + } - inline virtual wxButton *GetWindowCloseButton() const { return m_windowCloseButton; } - inline virtual wxButton *GetWindowCancelButton() const { return m_windowCancelButton; } - inline virtual wxButton *GetHelpButton() const { return m_windowHelpButton; } + inline virtual wxButton *GetWindowCloseButton() const + { + return m_windowCloseButton; + } + inline virtual wxButton *GetWindowCancelButton() const + { + return m_windowCancelButton; + } + inline virtual wxButton *GetHelpButton() const + { + return m_windowHelpButton; + } public: static bool sm_dialogCancelled; @@ -121,13 +142,20 @@ DECLARE_DYNAMIC_CLASS(wxPropertyFormValidator) protected: public: - wxPropertyFormValidator(long flags = 0): wxPropertyValidator(flags) { } - ~wxPropertyFormValidator(void) {} + wxPropertyFormValidator(long flags = 0): wxPropertyValidator(flags) + { + } + ~wxPropertyFormValidator(void) + { + } // Called to check value is OK (e.g. when OK is pressed) // Return false if value didn't check out; signal to restore old value. virtual bool OnCheckValue( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { return true; } + wxWindow *WXUNUSED(parentWindow) ) + { + return true; + } // Does the transferance from the property editing area to the property itself. // Called by the view, e.g. when closing the window. @@ -137,13 +165,21 @@ virtual bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow) = 0; virtual void OnDoubleClick( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } + wxWindow *WXUNUSED(parentWindow) ) + { + } virtual void OnSetFocus( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } + wxWindow *WXUNUSED(parentWindow) ) + { + } virtual void OnKillFocus( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) { } + wxWindow *WXUNUSED(parentWindow) ) + { + } virtual void OnCommand( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow), wxCommandEvent& WXUNUSED(event) ) {} + wxWindow *WXUNUSED(parentWindow), wxCommandEvent& WXUNUSED(event) ) + { + } private: }; @@ -160,7 +196,9 @@ { m_realMin = min; m_realMax = max; } - ~wxRealFormValidator(void) {} + ~wxRealFormValidator(void) + { + } bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); @@ -181,7 +219,9 @@ { m_integerMin = min; m_integerMax = max; } - ~wxIntegerFormValidator(void) {} + ~wxIntegerFormValidator(void) + { + } bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); @@ -200,7 +240,9 @@ wxBoolFormValidator(long flags = 0):wxPropertyFormValidator(flags) { } - ~wxBoolFormValidator(void) {} + ~wxBoolFormValidator(void) + { + } bool OnCheckValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); bool OnRetrieveValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); @@ -278,8 +320,14 @@ // Extend event processing to search the view's event table virtual bool ProcessEvent(wxEvent& event); - void SetView(wxPropertyFormView* view) { m_view = view; } - wxPropertyFormView* GetView() const { return m_view; } + void SetView(wxPropertyFormView* view) + { + m_view = view; + } + wxPropertyFormView* GetView() const + { + return m_view; + } private: wxPropertyFormView* m_view; @@ -311,7 +359,10 @@ // Must call this to create panel and associate view virtual bool Initialize(void); virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyFormView *v); - inline virtual wxPanel *GetPropertyPanel(void) const { return m_propertyPanel; } + inline virtual wxPanel *GetPropertyPanel(void) const + { + return m_propertyPanel; + } private: wxPropertyFormView* m_view; Modified: trunk/jazz/src/DeprecatedWx/proplist.h =================================================================== --- trunk/jazz/src/DeprecatedWx/proplist.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/DeprecatedWx/proplist.h 2010-04-28 23:14:07 UTC (rev 775) @@ -144,23 +144,65 @@ void OnEdit(wxCommandEvent& event); void OnText(wxCommandEvent& event); - inline virtual wxListBox *GetPropertyScrollingList() const { return m_propertyScrollingList; } - inline virtual wxListBox *GetValueList() const { return m_valueList; } - inline virtual wxTextCtrl *GetValueText() const { return m_valueText; } - inline virtual wxButton *GetConfirmButton() const { return m_confirmButton; } - inline virtual wxButton *GetCancelButton() const { return m_cancelButton; } - inline virtual wxButton *GetEditButton() const { return m_editButton; } - inline virtual bool GetDetailedEditing(void) const { return m_detailedEditing; } + inline virtual wxListBox *GetPropertyScrollingList() const + { + return m_propertyScrollingList; + } + inline virtual wxListBox *GetValueList() const + { + return m_valueList; + } + inline virtual wxTextCtrl *GetValueText() const + { + return m_valueText; + } + inline virtual wxButton *GetConfirmButton() const + { + return m_confirmButton; + } + inline virtual wxButton *GetCancelButton() const + { + return m_cancelButton; + } + inline virtual wxButton *GetEditButton() const + { + return m_editButton; + } + inline virtual bool GetDetailedEditing(void) const + { + return m_detailedEditing; + } - inline virtual void AssociatePanel(wxPanel *win) { m_propertyWindow = win; } - inline virtual wxPanel *GetPanel(void) const { return m_propertyWindow; } + inline virtual void AssociatePanel(wxPanel *win) + { + m_propertyWindow = win; + } + inline virtual wxPanel *GetPanel(void) const + { + return m_propertyWindow; + } - inline virtual void SetManagedWindow(wxWindow *win) { m_managedWindow = win; } - inline virtual wxWindow *GetManagedWindow(void) const { return m_managedWindow; } + inline virtual void SetManagedWindow(wxWindow *win) + { + m_managedWindow = win; + } + inline virtual wxWindow *GetManagedWindow(void) const + { + return m_managedWindow; + } - inline virtual wxButton *GetWindowCloseButton() const { return m_windowCloseButton; } - inline virtual wxButton *GetWindowCancelButton() const { return m_windowCancelButton; } - inline virtual wxButton *GetHelpButton() const { return m_windowHelpButton; } + inline virtual wxButton *GetWindowCloseButton() const + { + return m_windowCloseButton; + } + inline virtual wxButton *GetWindowCancelButton() const + { + return m_windowCancelButton; + } + inline virtual wxButton *GetHelpButton() const + { + return m_windowHelpButton; + } bool OnClose(void); @@ -223,8 +265,12 @@ class WXDLLIMPEXP_DEPRECATED wxPropertyListValidator: public wxPropertyValidator { public: - wxPropertyListValidator(long flags = wxPROP_ALLOW_TEXT_EDITING): wxPropertyValidator(flags) { } - ~wxPropertyListValidator() {} + wxPropertyListValidator(long flags = wxPROP_ALLOW_TEXT_EDITING): wxPropertyValidator(flags) + { + } + ~wxPropertyListValidator() + { + } // Called when the property is selected or deselected: typically displays the value // in the edit control (having chosen a suitable control to display: (non)editable text or listbox) @@ -329,8 +375,14 @@ ~wxPropertyListPanel(); void OnDefaultAction(wxControl *item); - inline void SetView(wxPropertyListView* v) { m_view = v; } - inline wxPropertyListView* GetView() const { return m_view; } + inline void SetView(wxPropertyListView* v) + { + m_view = v; + } + inline wxPropertyListView* GetView() const + { + return m_view; + } // Extend event processing to search the view's event table virtual bool ProcessEvent(wxEvent& event); @@ -370,8 +422,14 @@ // Must call this to create panel and associate view virtual bool Initialize(void); virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); - inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; } - inline wxPropertyListView* GetView() const { return m_view; } + inline virtual wxPropertyListPanel *GetPropertyPanel(void) const + { + return m_propertyPanel; + } + inline wxPropertyListView* GetView() const + { + return m_view; + } private: wxPropertyListView* m_view; @@ -392,7 +450,9 @@ // 0.0, 0.0 means no range wxRealListValidator(float min = 0.0, float max = 0.0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags) { m_realMin = min; m_realMax = max; } - ~wxRealListValidator() {} + ~wxRealListValidator() + { + } bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); @@ -421,7 +481,9 @@ { m_integerMin = min; m_integerMax = max; } - ~wxIntegerListValidator() {} + ~wxIntegerListValidator() + { + } bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); @@ -445,8 +507,12 @@ class WXDLLIMPEXP_DEPRECATED wxBoolListValidator: public wxPropertyListValidator { public: - wxBoolListValidator(long flags = 0):wxPropertyListValidator(flags) {} - ~wxBoolListValidator() {} + wxBoolListValidator(long flags = 0):wxPropertyListValidator(flags) + { + } + ~wxBoolListValidator() + { + } bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); @@ -562,7 +628,9 @@ { public: wxListOfStringsListValidator(long flags = 0); - ~wxListOfStringsListValidator() {} + ~wxListOfStringsListValidator() + { + } bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); Modified: trunk/jazz/src/Dialogs/copyright.cpp =================================================================== --- trunk/jazz/src/Dialogs/copyright.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Dialogs/copyright.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -52,7 +52,8 @@ sheet->AddProperty(copyrightProp); } -bool tCopyrightDlg::OnClose(){ +bool tCopyrightDlg::OnClose() +{ song->GetTrack(0)->SetCopyright(copyrightProp->GetValue().StringValue() ); return FALSE; } Modified: trunk/jazz/src/Dialogs/midiThruDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/midiThruDialog.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Dialogs/midiThruDialog.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -65,7 +65,8 @@ void tMidiThruDlg::EditForm(wxPanel *panel) { - if (Midi->SupportsMultipleDevices()) { + if (Midi->SupportsMultipleDevices()) + { Add(InputDeviceChoice.mkFormItem(300, 50)); Add(wxMakeFormNewLine()); Add(OutputDeviceChoice.mkFormItem(300, 50)); Modified: trunk/jazz/src/DynamicArray.h =================================================================== --- trunk/jazz/src/DynamicArray.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/DynamicArray.h 2010-04-28 23:14:07 UTC (rev 775) @@ -216,8 +216,14 @@ JZIntArray mArray; // this works for sizeof(int) >= 4 - int index(int i) { return i >> 5; } - int mask(int i) { return 1 << (i & 31); } + int index(int i) + { + return i >> 5; + } + int mask(int i) + { + return 1 << (i & 31); + } }; Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Events.h 2010-04-28 23:14:07 UTC (rev 775) @@ -363,32 +363,110 @@ return (mClock & KILLED_CLOCK) != 0; } - virtual JZMetaEvent* IsMetaEvent() { return 0; } - virtual JZChannelEvent* IsChannelEvent() { return 0; } - virtual JZKeyOnEvent* IsKeyOn() { return 0; } - virtual JZKeyOffEvent* IsKeyOff() { return 0; } - virtual JZPitchEvent* IsPitch() { return 0; } - virtual JZControlEvent* IsControl() { return 0; } - virtual JZProgramEvent* IsProgram() { return 0; } - virtual JZSysExEvent* IsSysEx() { return 0; } - virtual JZSongPtrEvent* IsSongPtr() { return 0; } - virtual JZMidiClockEvent* IsMidiClock() { return 0; } - virtual JZStartPlayEvent* IsStartPlay() { return 0; } - virtual JZContPlayEvent* IsContPlay() { return 0; } - virtual JZStopPlayEvent* IsStopPlay() { return 0; } - virtual JZTextEvent* IsText() { return 0; } - virtual JZCopyrightEvent* IsCopyright() { return 0; } - virtual JZTrackNameEvent* IsTrackName() { return 0; } - virtual JZMarkerEvent* IsMarker() { return 0; } - virtual JZSetTempoEvent* IsSetTempo() { return 0; } - virtual JZMtcOffsetEvent* IsMtcOffset() { return 0; } - virtual JZTimeSignatEvent* IsTimeSignat() { return 0; } - virtual JZKeySignatEvent* IsKeySignat() { return 0; } - virtual JZKeyPressureEvent* IsKeyPressure() { return 0; } - virtual JZJazzMetaEvent* IsJazzMeta() { return 0; } - virtual JZPlayTrackEvent* IsPlayTrack() { return 0; } - virtual JZEndOfTrackEvent* IsEndOfTrack() { return 0; } - virtual JZChnPressureEvent* IsChnPressure() { return 0; } + virtual JZMetaEvent* IsMetaEvent() + { + return 0; + } + virtual JZChannelEvent* IsChannelEvent() + { + return 0; + } + virtual JZKeyOnEvent* IsKeyOn() + { + return 0; + } + virtual JZKeyOffEvent* IsKeyOff() + { + return 0; + } + virtual JZPitchEvent* IsPitch() + { + return 0; + } + virtual JZControlEvent* IsControl() + { + return 0; + } + virtual JZProgramEvent* IsProgram() + { + return 0; + } + virtual JZSysExEvent* IsSysEx() + { + return 0; + } + virtual JZSongPtrEvent* IsSongPtr() + { + return 0; + } + virtual JZMidiClockEvent* IsMidiClock() + { + return 0; + } + virtual JZStartPlayEvent* IsStartPlay() + { + return 0; + } + virtual JZContPlayEvent* IsContPlay() + { + return 0; + } + virtual JZStopPlayEvent* IsStopPlay() + { + return 0; + } + virtual JZTextEvent* IsText() + { + return 0; + } + virtual JZCopyrightEvent* IsCopyright() + { + return 0; + } + virtual JZTrackNameEvent* IsTrackName() + { + return 0; + } + virtual JZMarkerEvent* IsMarker() + { + return 0; + } + virtual JZSetTempoEvent* IsSetTempo() + { + return 0; + } + virtual JZMtcOffsetEvent* IsMtcOffset() + { + return 0; + } + virtual JZTimeSignatEvent* IsTimeSignat() + { + return 0; + } + virtual JZKeySignatEvent* IsKeySignat() + { + return 0; + } + virtual JZKeyPressureEvent* IsKeyPressure() + { + return 0; + } + virtual JZJazzMetaEvent* IsJazzMeta() + { + return 0; + } + virtual JZPlayTrackEvent* IsPlayTrack() + { + return 0; + } + virtual JZEndOfTrackEvent* IsEndOfTrack() + { + return 0; + } + virtual JZChnPressureEvent* IsChnPressure() + { + return 0; + } virtual int Write(JZWriteBase& io) { Modified: trunk/jazz/src/Harmony.cpp =================================================================== --- trunk/jazz/src/Harmony.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Harmony.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -382,7 +382,9 @@ class tHBPlayerForm : public wxForm { public: - tHBPlayerForm() : wxForm( USED_WXFORM_BUTTONS ) {} + tHBPlayerForm() : wxForm( USED_WXFORM_BUTTONS ) + { + } void OnHelp() { gpHelpInstance->ShowTopic("Harmony browser"); @@ -1164,9 +1166,15 @@ { public: HBSettingsForm(HBCanvas *c) - : wxForm( USED_WXFORM_BUTTONS ) - { mpHbWindow = c; } - virtual void OnOk() { mpHbWindow->OnPaint(); wxForm::OnOk(); } + : wxForm( USED_WXFORM_BUTTONS ) + { + mpHbWindow = c; + } + virtual void OnOk() + { + mpHbWindow->OnPaint(); + wxForm::OnOk(); + } virtual void OnHelp(); private: HBCanvas *mpHbWindow; @@ -1637,8 +1645,14 @@ HBChord scale; int chord_key; int scale_key; - int ChordKey(int i = 0) const { return (chord_key + i) % 12; } - int ScaleKey(int i = 0) const { return (chord_key + i) % 12; } // yes, its chord_key! + int ChordKey(int i = 0) const + { + return (chord_key + i) % 12; + } + int ScaleKey(int i = 0) const + { + return (chord_key + i) % 12; + } HBContext *pcontext; HBPlayer player; Modified: trunk/jazz/src/HarmonyBrowserAnalyzer.cpp =================================================================== --- trunk/jazz/src/HarmonyBrowserAnalyzer.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/HarmonyBrowserAnalyzer.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -320,7 +320,8 @@ #else -class tChordMatrix { +class tChordMatrix +{ public: tChordMatrix() { Modified: trunk/jazz/src/HarmonyP.cpp =================================================================== --- trunk/jazz/src/HarmonyP.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/HarmonyP.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -576,7 +576,8 @@ #if 0 #include <ctype.h> -struct scdef { +struct scdef +{ const char *name; const char *def; }; Modified: trunk/jazz/src/PianoFrame.cpp =================================================================== --- trunk/jazz/src/PianoFrame.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/PianoFrame.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -563,7 +563,11 @@ JZPianoFrame *pPianoWindow; public: - tVisibleDlg(JZPianoFrame *p) : wxForm( USED_WXFORM_BUTTONS ), pPianoWindow(p) {} + tVisibleDlg(JZPianoFrame *p) + : wxForm( USED_WXFORM_BUTTONS ), + pPianoWindow(p) + { + } void EditForm(wxPanel *panel); virtual void OnOk(); virtual void OnHelp(); Modified: trunk/jazz/src/Player.h =================================================================== --- trunk/jazz/src/Player.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Player.h 2010-04-28 23:14:07 UTC (rev 775) @@ -624,8 +624,15 @@ virtual bool IsInstalled(); virtual ~tSeq2Player(); int OutEvent(JZEvent *e, int now); - int OutEvent(JZEvent *e) { OutEvent(e, 0); return 0; } - void OutNow(JZEvent *e) { OutEvent(e, 1); } + int OutEvent(JZEvent *e) + { + OutEvent(e, 0); + return 0; + } + void OutNow(JZEvent *e) + { + OutEvent(e, 1); + } void OutBreak(); void OutBreak(long BreakOver); void StartPlay(long Clock, long LoopClock = 0, int Continue = 0); @@ -635,7 +642,6 @@ void SetSoftThru(int on, int idev, int odev); int FindMidiDevice(); - protected: long play_clock; Modified: trunk/jazz/src/Random.h =================================================================== --- trunk/jazz/src/Random.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Random.h 2010-04-28 23:14:07 UTC (rev 775) @@ -57,32 +57,58 @@ public: - int Null() { return nul; } - void SetNull(int n) { nul = n; } + int Null() + { + return nul; + } + void SetNull(int n) + { + nul = n; + } JZRndArray(int n, int min, int max); JZRndArray & operator = (const JZRndArray &); JZRndArray(JZRndArray const &); virtual ~JZRndArray(); - int &operator[] (int i) { return mArray[i]; } - int operator[] (int i) const { return mArray[i]; } + int &operator[] (int i) + { + return mArray[i]; + } + int operator[] (int i) const + { + return mArray[i]; + } /* PAT - The following ifdef was removed due to changes in gcc 3.x. If it needs to be put back for compatibility purposes, it will need to return in an alternate form. */ /*#ifdef FOR_MSW*/ double operator[](double f); - float operator[](float f) { + float operator[](float f) + { /*#else double operator[](double f) const; - float operator[](float f) const { + float operator[](float f) const + { #endif*/ return (float)operator[]((double)f); } - int Size() const { return n; } - int Min() const { return min; } - int Max() const { return max; } + int Size() const + { + return n; + } + int Min() const + { + return min; + } + int Max() const + { + return max; + } void SetMinMax(int min, int max); - void Resize(int nn) { n = nn; } + void Resize(int nn) + { + n = nn; + } friend std::ostream & operator << (std::ostream &, JZRndArray const &); friend std::istream & operator >> (std::istream &, JZRndArray &); @@ -175,14 +201,22 @@ virtual void SetLabel(char const *llabel); void Enable(int enable = 1); - void SetStyle(int style) { style_bits = style; } + void SetStyle(int style) + { + style_bits = style; + } // min and max value in array (both values inclusive) void SetYMinMax(int min, int max); // for display x-axis only, does not resize the array (both values inclusive) void SetXMinMax(int xmin, int xmax); void DrawBarLine (wxDC *dc, int xx); - void SetDrawBars(tArrayEditDrawBars *x) { draw_bars = x; } - void Init() {} + void SetDrawBars(tArrayEditDrawBars *x) + { + draw_bars = x; + } + void Init() + { + } DECLARE_EVENT_TABLE() }; Modified: trunk/jazz/src/ResourceDialog.h =================================================================== --- trunk/jazz/src/ResourceDialog.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/ResourceDialog.h 2010-04-28 23:14:07 UTC (rev 775) @@ -202,19 +202,28 @@ If the function returns true, the Attached data will be set and the dialog will be hidden. */ - virtual bool OnOk() { return true; } + virtual bool OnOk() + { + return true; + } /// Cancel event handler /** Called when a dialog produced by Show() has caused a wxID_CANCEL event. If the function returns true, the dialog will be hidden. */ - virtual bool OnCancel() { return true; } + virtual bool OnCancel() + { + return true; + } /// Apply event handler /** Called when a dialog produced by Show() has caused a wxID_APPLY event. If the function returns true, the Attached data will be set. */ - virtual bool OnApply() { return true; } + virtual bool OnApply() + { + return true; + } private: Modified: trunk/jazz/src/Rhythm.h =================================================================== --- trunk/jazz/src/Rhythm.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Rhythm.h 2010-04-28 23:14:07 UTC (rev 775) @@ -197,7 +197,10 @@ tArrayEdit *veloc_edit; tRhyArrayEdit *rhythm_edit; - enum { MAX_INSTRUMENTS = 20 }; + enum + { + MAX_INSTRUMENTS = 20 + }; tRhythm *instruments[MAX_INSTRUMENTS]; int n_instruments; int act_instrument; // -1 if none Modified: trunk/jazz/src/Sample.h =================================================================== --- trunk/jazz/src/Sample.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Sample.h 2010-04-28 23:14:07 UTC (rev 775) @@ -110,7 +110,10 @@ float Peak(int fr = -1, int to = -1); void Rescale(float maxval = 32766.0, int fr = -1, int to = -1); void RescaleToShort(int fr = -1, int to = -1); - float &operator[](int i) { return data[i]; } + float &operator[](int i) + { + return data[i]; + } void Initialize(int size = 0); void PasteMix(tFloatSample &src, int offs = 0); void PasteMix(tSample &src, int offs = 0); @@ -197,7 +200,8 @@ * that is offs % set.GetChannels() == 0. */ -class tSample { +class tSample +{ friend class tFloatSample; friend class tSplPan; friend class tSplPitch; @@ -216,43 +220,52 @@ // Properties void SetLabel(const char *str); - const char *GetLabel() const { + const char *GetLabel() const + { return label; } - void SetVolume(int vol) { + void SetVolume(int vol) + { dirty |= (vol != volume); volume = vol; } - int GetVolume() const { + int GetVolume() const + { return volume; } - void SetPan(int p) { + void SetPan(int p) + { dirty |= (p != pan); pan = p; } - int GetPan() const { + int GetPan() const + { return pan; } - void SetPitch(int p) { + void SetPitch(int p) + { dirty |= (p != pitch); pitch = p; } - int GetPitch() const { + int GetPitch() const + { return pitch; } void SetFilename(const char *fname); - const char *GetFilename() const { + const char *GetFilename() const + { return filename; } - int GetLength() const { + int GetLength() const + { return length; } @@ -274,14 +287,16 @@ void Clear(); - void GotoRAM() { + void GotoRAM() + { // Try to swap this sample into memory. volatile short dummy; for (int i = 0; i < length; i++) dummy = data[i]; } - short *GetData() { + short *GetData() + { return data; } @@ -290,11 +305,13 @@ * access global adustments from tSampleSet */ - tSampleSet &SampleSet() { + tSampleSet &SampleSet() + { return set; } - tSampleSet *operator->() { + tSampleSet *operator->() + { return &set; } Modified: trunk/jazz/src/SampleCommand.h =================================================================== --- trunk/jazz/src/SampleCommand.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/SampleCommand.h 2010-04-28 23:14:07 UTC (rev 775) @@ -38,13 +38,19 @@ class tPaintableCommand { public: - tPaintableCommand(tSample &s) : spl(s) {} + tPaintableCommand(tSample &s) : spl(s) + { + } virtual int NumArrays() = 0; virtual JZRndArray & GetArray(int i) = 0; virtual const char * GetLabel(int i) = 0; virtual void Execute(long fr, long to) = 0; - virtual void Initialize() {} - virtual ~tPaintableCommand() {} + virtual void Initialize() + { + } + virtual ~tPaintableCommand() + { + } protected: tSample &spl; }; @@ -57,9 +63,18 @@ { public: tPaintableCommand1(tSample &s, int num, int min, int max) - : tPaintableCommand(s), arr(num, min, max) { } - virtual int NumArrays() { return 1; } - virtual JZRndArray & GetArray(int i) { return arr; } + : tPaintableCommand(s), + arr(num, min, max) + { + } + virtual int NumArrays() + { + return 1; + } + virtual JZRndArray & GetArray(int i) + { + return arr; + } virtual void Initialize(); protected: JZRndArray arr; @@ -69,27 +84,46 @@ class tSplVolume : public tPaintableCommand1 { public: - const char * GetLabel(int i) { return "volume"; } - tSplVolume(tSample &s) : tPaintableCommand1(s, 200, -100, 100) { } + const char * GetLabel(int i) + { + return "volume"; + } + tSplVolume(tSample &s) : tPaintableCommand1(s, 200, -100, 100) + { + } void Execute(long fr, long to); }; class tSplPan : public tPaintableCommand1 { public: - const char * GetLabel(int i) { return "pan"; } - tSplPan(tSample &s) : tPaintableCommand1(s, 200, -100, 100) { } + const char * GetLabel(int i) + { + return "pan"; + } + tSplPan(tSample &s) : tPaintableCommand1(s, 200, -100, 100) + { + } void Execute(long fr, long to); }; class tSplPitch : public tPaintableCommand1 { public: - const char * GetLabel(int i) { return "pitch"; } - tSplPitch(tSample &s) : tPaintableCommand1(s, 200, -100, 100) { range = 1.2f; } + const char * GetLabel(int i) + { + return "pitch"; + } + tSplPitch(tSample &s) : tPaintableCommand1(s, 200, -100, 100) + { + range = 1.2f; + } void Execute(long fr, long to); // range = frequency factor, e.g. 2 will transpose on octave up or down - void SetRange(float r) { range = r; } + void SetRange(float r) + { + range = r; + } private: float range; }; @@ -119,7 +153,10 @@ float SR; int resetval; - enum { SIZE = 512 }; + enum + { + SIZE = 512 + }; float array[SIZE]; float tabs[2]; /* for lineset */ int lineset; @@ -131,7 +168,8 @@ friend class tWahSettingsForm; public: tWahWah(tSample &s); - virtual const char * GetLabel(int i) { + virtual const char * GetLabel(int i) + { return "freq"; } virtual void Execute(long fr, long to); Modified: trunk/jazz/src/SampleDialog.cpp =================================================================== --- trunk/jazz/src/SampleDialog.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/SampleDialog.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -336,7 +336,8 @@ double fy = ymap.XToY(arr[(float)fx]); data[i] = (short)fy; } - else { + else + { x = -x; double fx = xmap.XToY(x); double fy = ymap.XToY(arr[(float)fx]); Modified: trunk/jazz/src/SampleDialog.h =================================================================== --- trunk/jazz/src/SampleDialog.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/SampleDialog.h 2010-04-28 23:14:07 UTC (rev 775) @@ -135,7 +135,10 @@ wxSlider *midi_key_slider; wxSlider *duration_slider; - enum { MAXSYNTHS = 6 }; + enum + { + MAXSYNTHS = 6 + }; tAddSynth *synths[MAXSYNTHS]; static int num_synths; static int midi_key; Modified: trunk/jazz/src/SampleWindow.cpp =================================================================== --- trunk/jazz/src/SampleWindow.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/SampleWindow.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -273,7 +273,8 @@ Start(100); } - bool IsListening() const { + bool IsListening() const + { return gpMidiPlayer->IsListening(); } @@ -931,7 +932,8 @@ offs = cnvs->sel_fr; return TRUE; } - else { + else + { offs = -1; if (warn) wxMessageBox("please set insertion point first", "Error", wxOK); Modified: trunk/jazz/src/SampleWindow.h =================================================================== --- trunk/jazz/src/SampleWindow.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/SampleWindow.h 2010-04-28 23:14:07 UTC (rev 775) @@ -52,13 +52,19 @@ virtual void OnMenuCommand(int id); void Redraw(); bool HaveInsertionPoint(int &offs, bool warn = TRUE); - enum HaveSelectionMode { SelWarn, SelNoWarn, SelAll} ; + enum HaveSelectionMode + { + SelWarn, + SelNoWarn, + SelAll + }; bool HaveSelection(int &fr_smpl, int &to_smpl, HaveSelectionMode = SelAll); void AddParam(JZRndArray *array, const char *label); void ClrParam(); void ClearSelection(); - tSample &GetSample() { + tSample &GetSample() + { return spl; } void PlaySample(); @@ -85,7 +91,10 @@ static tSample *copy_buffer; - enum { MAXPARAM = 4 }; + enum + { + MAXPARAM = 4 + }; tArrayEdit *params[MAXPARAM]; int num_params; Modified: trunk/jazz/src/Signal2.h =================================================================== --- trunk/jazz/src/Signal2.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Signal2.h 2010-04-28 23:14:07 UTC (rev 775) @@ -82,8 +82,11 @@ class tExpoMap { public: - tExpoMap(T x, T y) : map(-x, x, -log(y), log(y)) { } - T operator()(T x) { + tExpoMap(T x, T y) : map(-x, x, -log(y), log(y)) + { + } + T operator()(T x) + { return exp(map(x)); } private: @@ -351,11 +354,14 @@ current = -1; } - virtual ~tSigInput() {} + virtual ~tSigInput() + { + } void GetSample(tSigValue &ret) { - if (synth.current >= current) { + if (synth.current >= current) + { current = synth.current + 1; NextValue(); } @@ -364,7 +370,8 @@ float GetControl() { - if (synth.current >= current) { + if (synth.current >= current) + { current = synth.current + 100; NextValue(); ctl = 0; @@ -375,15 +382,21 @@ return ctl; } - int HasChanged() const { + int HasChanged() const + { return synth.current >= current; } - virtual void Init() { // called once before performance starts + virtual void Init() + { + // called once before performance starts current = -1; } - virtual long GetLength() { return 0; } + virtual long GetLength() + { + return 0; + } virtual void NextValue() = 0; protected: @@ -401,7 +414,9 @@ class tSigOutput : public tSigInput { public: - tSigOutput(tSigSynth &synth) : tSigInput(synth) {} + tSigOutput(tSigSynth &synth) : tSigInput(synth) + { + } virtual void Out(const tSigValue &v) = 0; virtual void Resize(long) = 0; }; @@ -595,28 +610,34 @@ have_freq_control = 0; } - virtual void Init() { + virtual void Init() + { tSignalModifier::Init(); have_freq_control = (controls.size() != 0); } - tSigValue & operator[](int i) { + tSigValue & operator[](int i) + { return array[i]; } - const tSigValue & operator[](int i) const { + const tSigValue & operator[](int i) const + { return array[i]; } - void NextValue() { - if (have_freq_control && controls[0]->HasChanged()) { + void NextValue() + { + if (have_freq_control && controls[0]->HasChanged()) + { dx = array.Size() / SR * freq * fmap(controls[0]->GetControl()); } array.CyclicInterpolate(val, x); x += dx; } - long Size() const { + long Size() const + { return array.Size(); } @@ -643,19 +664,23 @@ { } - tSigValue & operator[](int i) { + tSigValue & operator[](int i) + { return array[i]; } - const tSigValue & operator[](int i) const { + const tSigValue & operator[](int i) const + { return array[i]; } - void NextValue() { + void NextValue() + { array.Interpolate(val, xmap(current)); } - long Size() const { + long Size() const + { return array.Size(); } @@ -674,7 +699,8 @@ { } - void NextValue() { + void NextValue() + { for (int i = 0; i < channels; i++) val[i] = ((rnd.asDouble() * 2.0) - 1.0) * 32000.0; } @@ -694,7 +720,9 @@ val[i] = x; } - virtual void NextValue() {} + virtual void NextValue() + { + } }; @@ -712,7 +740,8 @@ map.Initialize(0, plen, phi, phi + 2 * PI); ampl = amp; } - void NextValue() { + void NextValue() + { float y = ampl * sin(map((double)current)); for (int i = 0; i < channels; i++) val[i] = y; @@ -732,8 +761,11 @@ class tSigVolume : public tSignalModifier { public: - tSigVolume(tSigSynth &synth) : tSignalModifier(synth) {} - void NextValue() { + tSigVolume(tSigSynth &synth) : tSignalModifier(synth) + { + } + void NextValue() + { float vol = controls[0]->GetControl(); inputs[0]->GetSample(val); for (int i = 0; i < channels; i++) @@ -749,8 +781,11 @@ class tSigPanpot : public tSignalModifier { public: - tSigPanpot(tSigSynth &synth) : tSignalModifier(synth) {} - void NextValue() { + tSigPanpot(tSigSynth &synth) : tSignalModifier(synth) + { + } + void NextValue() + { float p = controls[0]->GetControl(); inputs[0]->GetSample(val); if (p > 0) @@ -840,12 +875,14 @@ virtual ~tOpHighpass() { } - virtual void Setup(float sr, float hp, float dummy) { + virtual void Setup(float sr, float hp, float dummy) + { double b = 2.0 - cos(hp * 2.0 * PI / sr); c2 = b - sqrt(b * b - 1.0); c1 = 1.0 - c2; } - virtual float Loop(float sig) { + virtual float Loop(float sig) + { float tmp = y1 = c2 * (y1 + sig); y1 -= sig; return tmp; @@ -928,12 +965,15 @@ this->freq = freq; this->bandw = bandw; } - virtual void Init() { + virtual void Init() + { tSignalModifier::Init(); have_control = (controls.size() == 1); } - void NextValue() { - if (have_control && controls[0]->HasChanged()) { + void NextValue() + { + if (have_control && controls[0]->HasChanged()) + { float f = freq * fmap(controls[0]->GetControl()); for (int i = 0; i < channels; i++) filter[i].Setup(sr, f, bandw); @@ -942,7 +982,8 @@ for (int i = 0; i < channels; i++) val[i] = filter[i].FILTER::Loop(val[i]); } - tSigValue operator()(const tSigValue &sig) { + tSigValue operator()(const tSigValue &sig) + { for (int i = 0; i < channels; i++) val[i] = filter[i].FILTER::Loop(sig[i]); return val; @@ -965,7 +1006,8 @@ { public: - tSigLowpass(tSigSynth &synth, float fg) : tSignalModifier(synth) { + tSigLowpass(tSigSynth &synth, float fg) : tSignalModifier(synth) + { fg = fg / sampling_rate; a0 = 2 * PI * fg; // b1 = a0 - 1.0; // approx @@ -979,7 +1021,8 @@ val = sig * a0 - val * b1; } - tSigValue operator()(const tSigValue &sig) { + tSigValue operator()(const tSigValue &sig) + { val = sig * a0 - val * b1; return val; } @@ -1075,7 +1118,11 @@ class tSigReverb : public tSignalModifier { public: - enum { COMBS = 4, ALPAS = 2 }; + enum + { + COMBS = 4, + ALPAS = 2 + }; tSigReverb( tSigSynth &synth, float reverb_time = 0.7, @@ -1136,11 +1183,13 @@ { lfo.Init(*this); } - virtual int operator()(tSigValue &val) { + virtual int operator()(tSigValue &val) + { if (!sig(val)) return 0; float a = (lfo() + 1)/2; // map to 0..1 - if (channels > 1) { + if (channels > 1) + { float tmp = val[0]; val[0] -= a * val[1]; val[1] -= a * tmp; @@ -1160,15 +1209,19 @@ class tSigMix2 : public tSignalModifier { public: - tSigMix2(tSigSynth &synth) : tSignalModifier(synth) {} + tSigMix2(tSigSynth &synth) : tSignalModifier(synth) + { + } - void Init() { + void Init() + { tSignalModifier::Init(); // initialize sources len1 = inputs[0]->GetLength(); len2 = inputs[1]->GetLength(); } - void NextValue() { + void NextValue() + { tSigValue v1; tSigValue v2; inputs[0]->GetSample(v1); Modified: trunk/jazz/src/Synth.cpp =================================================================== --- trunk/jazz/src/Synth.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Synth.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -37,10 +37,11 @@ using namespace std; -#define SXDECL(id,len,arr) do {\ - sxlen[id] = len; \ - sxdata[id] = new unsigned char[len]; \ - memcpy(sxdata[id], arr, len); \ +#define SXDECL(id,len,arr) do\ +{\ + sxlen[id] = len;\ + sxdata[id] = new unsigned char[len];\ + memcpy(sxdata[id], arr, len);\ } while (0) Modified: trunk/jazz/src/Synth.h =================================================================== --- trunk/jazz/src/Synth.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Synth.h 2010-04-28 23:14:07 UTC (rev 775) @@ -337,32 +337,79 @@ return Sysex(clk, SX_GM_MasterVol, vol ); } - virtual JZEvent* MasterPanSX( long clk, unsigned char pan ) { return 0; } + virtual JZEvent* MasterPanSX( long clk, unsigned char pan ) + { + return 0; + } - virtual JZEvent* ModSX( int index, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* ModSX( int index, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* BendSX( int index, long clk, int cha, unsigned char val) { return 0; } + virtual JZEvent* BendSX( int index, long clk, int cha, unsigned char val) + { + return 0; + } - virtual JZEvent* CafSX( int index, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* CafSX( int index, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* PafSX( int index, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* PafSX( int index, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* CC1SX( int index, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* CC1SX( int index, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* CC2SX( int index, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* CC2SX( int index, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* PartialReserveSX( long clk, int cha, unsigned char *valptr ) { return 0; } - virtual JZEvent* RxChannelSX( long clk, int cha, unsigned char val ) { return 0; } - virtual JZEvent* UseForRhythmSX( long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* PartialReserveSX( long clk, int cha, unsigned char *valptr ) + { + return 0; + } + virtual JZEvent* RxChannelSX( long clk, int cha, unsigned char val ) + { + return 0; + } + virtual JZEvent* UseForRhythmSX( long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* ControllerNumberSX( int ctrlno, long clk, int cha, unsigned char val ) { return 0; } + virtual JZEvent* ControllerNumberSX( int ctrlno, long clk, int cha, unsigned char val ) + { + return 0; + } - virtual JZEvent* ReverbMacroSX( long clk, unsigned char val, unsigned char lsb = 0 ) { return 0; } - virtual JZEvent* ReverbParamSX( int index, long clk, unsigned char val ) { return 0; } - virtual JZEvent* ChorusMacroSX( long clk, unsigned char val, unsigned char lsb = 0 ) { return 0; } - virtual JZEvent* ChorusParamSX( int index, long clk, unsigned char val ) { return 0; } + virtual JZEvent* ReverbMacroSX( long clk, unsigned char val, unsigned char lsb = 0 ) + { + return 0; + } + virtual JZEvent* ReverbParamSX( int index, long clk, unsigned char val ) + { + return 0; + } + virtual JZEvent* ChorusMacroSX( long clk, unsigned char val, unsigned char lsb = 0 ) + { + return 0; + } + virtual JZEvent* ChorusParamSX( int index, long clk, unsigned char val ) + { + return 0; } - virtual JZEvent* EqualizerMacroSX( long clk, unsigned char val ) { return 0; } + virtual JZEvent* EqualizerMacroSX( long clk, unsigned char val ) + { + return 0; + } protected: Modified: trunk/jazz/src/Track.h =================================================================== --- trunk/jazz/src/Track.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/Track.h 2010-04-28 23:14:07 UTC (rev 775) @@ -609,11 +609,20 @@ void SetState(int NewState); void ToggleState(int Direction); // +1 = next, -1 = prev - int GetChannel() { return Channel; } + int GetChannel() + { + return Channel; + } void SetChannel(int NewChannel); - int GetDevice() const { return Device; } - void SetDevice(int d) { Device = d; } + int GetDevice() const + { + return Device; + } + void SetDevice(int d) + { + Device = d; + } int GetPatch(); void SetPatch(int PatchNr); Modified: trunk/jazz/src/gui/trackwinEnum.h =================================================================== --- trunk/jazz/src/gui/trackwinEnum.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/gui/trackwinEnum.h 2010-04-28 23:14:07 UTC (rev 775) @@ -20,7 +20,8 @@ ** */ -enum { +enum +{ MEN_LOAD =1, MEN_SAVE =2, MEN_QUIT =3, @@ -125,4 +126,3 @@ MEN_SELECTIONSUB=107, MEN_PIANOWIN2=108 }; - Modified: trunk/jazz/src/mswin/WindowsMidiInterface.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsMidiInterface.cpp 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/mswin/WindowsMidiInterface.cpp 2010-04-28 23:14:07 UTC (rev 775) @@ -578,10 +578,12 @@ DWORD dwParam2 ) { - if (wMsg == MOM_DONE) { + if (wMsg == MOM_DONE) + { MIDIHDR *hdr = (MIDIHDR *)dwParam1; tWinSysexBuffer *buf = (tWinSysexBuffer *)hdr->dwUser; - if (buf != 0) { // ignore OutNow() buffers + if (buf != 0) + { // ignore OutNow() buffers buf->Release(); OutputDebugString("release\n"); } Modified: trunk/jazz/src/mswin/WindowsMidiInterface.h =================================================================== --- trunk/jazz/src/mswin/WindowsMidiInterface.h 2010-04-28 21:36:26 UTC (rev 774) +++ trunk/jazz/src/mswin/WindowsMidiInterface.h 2010-04-28 23:14:07 UTC (rev 775) @@ -270,7 +270,8 @@ wr = (wr + 1) % MIDI_BUFFER_SIZE; } - int empty() const { + int empty() const + { return rd == wr; } Modified: trunk/jazz/src/ms... [truncated message content] |