From: <pst...@us...> - 2008-04-03 05:13:18
|
Revision: 392 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=392&view=rev Author: pstieber Date: 2008-04-02 22:13:17 -0700 (Wed, 02 Apr 2008) Log Message: ----------- Changed char* to const char*. Modified Paths: -------------- trunk/jazz/src/ControlEdit.h trunk/jazz/src/Player.cpp Modified: trunk/jazz/src/ControlEdit.h =================================================================== --- trunk/jazz/src/ControlEdit.h 2008-04-03 05:06:06 UTC (rev 391) +++ trunk/jazz/src/ControlEdit.h 2008-04-03 05:13:17 UTC (rev 392) @@ -35,7 +35,9 @@ class tCtrlPanel : public wxPanel { public: - friend class tCtrlEditBase; + + friend class tCtrlEditBase; + tCtrlPanel( tCtrlEditBase* e, wxWindow* pParent, @@ -44,11 +46,12 @@ int width=-1, int height=-1, long style=0, - char *name = "panel") - : wxPanel(pParent, x, y, width, height, style, name) + const char* pName = "panel") + : wxPanel(pParent, x, y, width, height, style, pName) { edit = e; } + tCtrlEditBase *edit; }; Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-04-03 05:06:06 UTC (rev 391) +++ trunk/jazz/src/Player.cpp 2008-04-03 05:13:17 UTC (rev 392) @@ -1455,56 +1455,69 @@ } - int tSeq2Player::FindMidiDevice() - { - struct synth_info si; - int i, nrsynths, ninp; +int tSeq2Player::FindMidiDevice() +{ + struct synth_info si; + int i, nrsynths, ninp; - if (ioctl(seqfd, SNDCTL_SEQ_NRSYNTHS, &nrsynths) == -1) { - perror("SNDCTL_SEQ_NRSYNTHS"); - return -1; - } + if (ioctl(seqfd, SNDCTL_SEQ_NRSYNTHS, &nrsynths) == -1) + { + perror("SNDCTL_SEQ_NRSYNTHS"); + return -1; + } - wxString *devs = new wxString[nrsynths]; + wxString *devs = new wxString[nrsynths]; - ninp = 0; - for (i = 0; i < nrsynths; i++) { - si.device = i; - if (ioctl(seqfd, SNDCTL_SYNTH_INFO, &si) == -1) { - perror("SNDCTL_SYNTH_INFO"); - return -1; - } - //if (si.synth_type == SYNTH_TYPE_MIDI || si.synth_type == SYNTH_TYPE_SAMPLE) - { - devs[ninp] = si.name; - ninp++; - } - } + ninp = 0; + for (i = 0; i < nrsynths; i++) + { + si.device = i; + if (ioctl(seqfd, SNDCTL_SYNTH_INFO, &si) == -1) + { + perror("SNDCTL_SYNTH_INFO"); + return -1; + } + // if (si.synth_type == SYNTH_TYPE_MIDI || si.synth_type == SYNTH_TYPE_SAMPLE) + { + devs[ninp] = si.name; + ninp++; + } + } - if (ninp > 0) { - char *title = "MIDI Device"; - wxSingleChoiceDialog *dialog = new wxSingleChoiceDialog(gpTrackWindow, - title, - title, - ninp, - devs); - if(mididev != -1) dialog->SetSelection(mididev); + if (ninp > 0) + { + const char* pTitle = "MIDI Device"; + wxSingleChoiceDialog *dialog = new wxSingleChoiceDialog( + gpTrackWindow, + pTitle, + pTitle, + ninp, + devs); - int res = dialog->ShowModal(); - int k = dialog->GetSelection(); - dialog->Destroy(); + if (mididev != -1) + { + dialog->SetSelection(mididev); + } - delete [] devs; + int res = dialog->ShowModal(); + int k = dialog->GetSelection(); + dialog->Destroy(); - if(res == wxCANCEL) k = -1; + delete [] devs; - return k; + if (res == wxCANCEL) + { + k = -1; + } - } else { - delete [] devs; - cerr << "no midi device found!\n"; - return -1; - } + return k; + } + else + { + delete [] devs; + cerr << "no midi device found!\n"; + return -1; + } } void tSeq2Player::SetSoftThru(int on, int idummy, int odummy) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |