From: <pst...@us...> - 2008-04-13 00:19:03
|
Revision: 458 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=458&view=rev Author: pstieber Date: 2008-04-12 17:18:54 -0700 (Sat, 12 Apr 2008) Log Message: ----------- 1. Added code to allow the setting of the MIDI device in Windows. 2. Changed wx_msw macro to __WXMSW__. 3. Changed tWinMtcPlayer to JZWindowsMtcPlayer. 4. Changed tWinMidiPlayer to JZWindowsMidiPlayer. 5. Changed tWinPlayer to JZWindowsPlayer. 6. Changed tWinMtcPlayer to JZWindowsMtcPlayer. 7. Changed tWinIntPlayer to JZWindowsIntPlayer. 8. Changed tWinAudioPlayer to JZWindowsAudioPlayer. 9. Changed ID_SETTINGS_SYNTH to ID_SETTINGS_SYNTHESIZER. Modified Paths: -------------- trunk/jazz/src/Audio.h trunk/jazz/src/Dialogs/midiTiming.cpp trunk/jazz/src/Project.cpp trunk/jazz/src/Resources.h trunk/jazz/src/TrackFrame.cpp trunk/jazz/src/TrackFrame.h trunk/jazz/src/gui/trackwinEnum.h trunk/jazz/src/mswin/WindowsAudioInterface.cpp trunk/jazz/src/mswin/WindowsAudioInterface.h trunk/jazz/src/mswin/WindowsMidiInterface.h trunk/jazz/src/mswin/WindowsPlayer.cpp trunk/jazz/src/mswin/WindowsPlayer.h Modified: trunk/jazz/src/Audio.h =================================================================== --- trunk/jazz/src/Audio.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/Audio.h 2008-04-13 00:18:54 UTC (rev 458) @@ -177,7 +177,7 @@ class tAudioRecordBuffer { friend class tSampleSet; - friend class tWinAudioPlayer; + friend class JZWindowsAudioPlayer; public: @@ -224,7 +224,7 @@ friend class tSample; friend class tAudioGloblForm; friend class tSamplesDlg; - friend class tWinAudioPlayer; + friend class JZWindowsAudioPlayer; friend class tAudioPlayer; friend class tAlsaAudioPlayer; Modified: trunk/jazz/src/Dialogs/midiTiming.cpp =================================================================== --- trunk/jazz/src/Dialogs/midiTiming.cpp 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/Dialogs/midiTiming.cpp 2008-04-13 00:18:54 UTC (rev 458) @@ -55,13 +55,13 @@ void tTimingDlg::MtcInitRec() { -#ifdef wx_msw +#ifdef __WXMSW__ if (Config(C_ClockSource) != CsMtc) { delete Midi; Config(C_ClockSource) = CsMtc; ClkSrcListBox->SetStringSelection( ClkSrcArray[ Config(C_ClockSource) ] ); - Midi = new tWinMtcPlayer(EventWin->Song); + Midi = new JZWindowsMtcPlayer(EventWin->Song); if (!Midi->Installed()) { wxMessageBox("no midi driver installed", "Error", wxOK); @@ -130,7 +130,7 @@ if (i != Config(C_ClockSource)) { Config(C_ClockSource) = (tClockSource) i; -#ifdef wx_msw +#ifdef __WXMSW__ // Re-install the midi device delete Midi; @@ -138,10 +138,10 @@ switch (Config(C_ClockSource)) { case CsMidi: - Midi = new tWinMidiPlayer(EventWin->Song); + Midi = new JZWindowsMidiPlayer(EventWin->Song); break; case CsMtc: - Midi = new tWinMtcPlayer(EventWin->Song); + Midi = new JZWindowsMtcPlayer(EventWin->Song); break; case CsFsk: case CsInt: @@ -205,7 +205,7 @@ -1, -1); -#ifdef wx_msw +#ifdef __WXMSW__ ClkSrcListBox->Append( ClkSrcArray[CsInt] ); ClkSrcListBox->Append( ClkSrcArray[CsMidi] ); ClkSrcListBox->Append( ClkSrcArray[CsMtc] ); @@ -240,7 +240,7 @@ panel->NewLine(); -#ifdef wx_msw +#ifdef __WXMSW__ (void) new wxMessage( panel, "Record MTC offset: " ); (void) new tMidiButton( this, panel, (wxFunction) MtcRecFunc, "Start" ); panel->NewLine(); Modified: trunk/jazz/src/Project.cpp =================================================================== --- trunk/jazz/src/Project.cpp 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/Project.cpp 2008-04-13 00:18:54 UTC (rev 458) @@ -255,20 +255,20 @@ switch (mpConfig->GetValue(C_ClockSource)) { case CsMidi: - mpMidiPlayer = new tWinMidiPlayer(this); + mpMidiPlayer = new JZWindowsMidiPlayer(this); break; case CsMtc: - mpMidiPlayer = new tWinMtcPlayer(this); + mpMidiPlayer = new JZWindowsMtcPlayer(this); break; case CsFsk: case CsInt: default: - mpMidiPlayer = new tWinAudioPlayer(this); + mpMidiPlayer = new JZWindowsAudioPlayer(this); if (!mpMidiPlayer->Installed()) { mpMidiPlayer->ShowError(); delete mpMidiPlayer; - mpMidiPlayer = new tWinIntPlayer(this); + mpMidiPlayer = new JZWindowsIntPlayer(this); } break; } Modified: trunk/jazz/src/Resources.h =================================================================== --- trunk/jazz/src/Resources.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/Resources.h 2008-04-13 00:18:54 UTC (rev 458) @@ -34,7 +34,8 @@ #define ID_EXPORT_SELECTION_AS_MIDI wxID_HIGHEST + 2 #define ID_SETTINGS_METRONOME wxID_HIGHEST + 10 -#define ID_SETTINGS_SYNTH wxID_HIGHEST + 11 +#define ID_SETTINGS_SYNTHESIZER wxID_HIGHEST + 11 +#define ID_SETTINGS_MIDI_DEVICE wxID_HIGHEST + 12 #define ID_TRIM wxID_HIGHEST + 30 #define ID_QUANTIZE wxID_HIGHEST + 31 Modified: trunk/jazz/src/TrackFrame.cpp =================================================================== --- trunk/jazz/src/TrackFrame.cpp 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/TrackFrame.cpp 2008-04-13 00:18:54 UTC (rev 458) @@ -39,6 +39,10 @@ #include "Dialogs/SynthesizerSettingsDialog.h" #include "AboutDialog.h" +#ifdef __WXMSW__ +#include "mswin/WindowsPlayer.h" +#endif + // These are the tool bar icons. #include "Bitmaps/open.xpm" #include "Bitmaps/save.xpm" @@ -93,8 +97,10 @@ EVT_MENU(ID_SETTINGS_METRONOME, JZTrackFrame::OnSettingsMetronome) - EVT_MENU(ID_SETTINGS_SYNTH, JZTrackFrame::OnSettingsSynthesizerType) + EVT_MENU(ID_SETTINGS_SYNTHESIZER, JZTrackFrame::OnSettingsSynthesizerType) + EVT_MENU(ID_SETTINGS_MIDI_DEVICE, JZTrackFrame::OnSettingsMidiDevice) + EVT_MENU(wxID_HELP_CONTENTS, JZTrackFrame::OnHelpContents) EVT_MENU(wxID_ABOUT, JZTrackFrame::OnHelpAbout) @@ -334,19 +340,21 @@ pSettingMenu->Append(MEN_TIMING, "&Timing..."); pSettingMenu->Append(MEN_MIDI_THRU, "&Midi Thru..."); #endif - pSettingMenu->Append(ID_SETTINGS_SYNTH, "&Synthesizer Type..."); + pSettingMenu->Append(ID_SETTINGS_SYNTHESIZER, "&Synthesizer Type..."); -#if 0 #ifdef __WXMSW__ - pSettingMenu->Append(MEN_DEVICE, "&Midi Device..."); + pSettingMenu->Append(ID_SETTINGS_MIDI_DEVICE, "&Midi Device..."); #else if ( gpConfig->GetValue(C_MidiDriver) == eMidiDriverOss || gpConfig->GetValue(C_MidiDriver) == eMidiDriverAlsa) { - pSettingMenu->Append(MEN_DEVICE, "&Midi Device..."); + pSettingMenu->Append(ID_SETTINGS_MIDI_DEVICE, "&Midi Device..."); } #endif + +#if 0 + save_settings_menu = new wxMenu; save_settings_menu->Append( MEN_SAVE_THRU, "&Midi Thru" ); save_settings_menu->Append( MEN_SAVE_TIM, "&Timing" ); @@ -567,6 +575,41 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +void JZTrackFrame::OnSettingsMidiDevice(wxCommandEvent& Event) +{ + long InputDevice, OutputDevice; +#ifdef __WXMSW__ + gpConfig->Get(C_WinInputDevice, InputDevice); + gpConfig->Get(C_WinOutputDevice, OutputDevice); + JZWindowsPlayer::SettingsDlg(InputDevice, OutputDevice); + ::wxMessageBox( + "Restart Jazz++ to activate changes in device settings", + "Info", + wxOK); +#else +/* + if (gpConfig->GetValue(C_MidiDriver) == eMidiDriverOss) + { + int Device = mpMidiPlayer->FindMidiDevice(); + if (Device >= 0) + { + SaveMidiDeviceSettings(Device); + ::wxMessageBox( + "Restart Jazz++ to activate changes in device settings", + "Info", + wxOK); + } + else + { + ::wxMessageBox("No midi device found", "Info", wxOK); + } + } +*/ +#endif +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZTrackFrame::OnHelpContents(wxCommandEvent& Event) { ::wxGetApp().DisplayHelpContents(); Modified: trunk/jazz/src/TrackFrame.h =================================================================== --- trunk/jazz/src/TrackFrame.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/TrackFrame.h 2008-04-13 00:18:54 UTC (rev 458) @@ -88,6 +88,8 @@ void OnSettingsSynthesizerType(wxCommandEvent& Event); + void OnSettingsMidiDevice(wxCommandEvent& Event); + void OnHelpContents(wxCommandEvent& Event); void OnHelpAbout(wxCommandEvent& Event); Modified: trunk/jazz/src/gui/trackwinEnum.h =================================================================== --- trunk/jazz/src/gui/trackwinEnum.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/gui/trackwinEnum.h 2008-04-13 00:18:54 UTC (rev 458) @@ -84,7 +84,6 @@ MEN_SUB_CC1=61, MEN_SUB_CC2=62, MEN_CLEANUP=63, - MEN_DEVICE=64, MEN_SAVE_SET=65, MEN_MIDI_THRU=66, MEN_COPYRIGHT=67, Modified: trunk/jazz/src/mswin/WindowsAudioInterface.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsAudioInterface.cpp 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/mswin/WindowsAudioInterface.cpp 2008-04-13 00:18:54 UTC (rev 458) @@ -50,7 +50,7 @@ public: - tAudioListener(tWinAudioPlayer* pPlayer, int key) + tAudioListener(JZWindowsAudioPlayer* pPlayer, int key) : wxTimer(), mpPlayer(pPlayer), mCount(0), @@ -74,7 +74,7 @@ } tAudioListener( - tWinAudioPlayer* pPlayer, + JZWindowsAudioPlayer* pPlayer, tSample& spl, long fr_smpl, long to_smpl) @@ -133,7 +133,7 @@ private: - tWinAudioPlayer* mpPlayer; + JZWindowsAudioPlayer* mpPlayer; long mCount; @@ -144,8 +144,8 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -tWinAudioPlayer::tWinAudioPlayer(JZSong* pSong) - : tWinIntPlayer(pSong), +JZWindowsAudioPlayer::JZWindowsAudioPlayer(JZSong* pSong) + : JZWindowsIntPlayer(pSong), mErrorCode(NoError), mCanDuplex(false), mCanSynchronize(true), @@ -197,7 +197,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -tWinAudioPlayer::~tWinAudioPlayer() +JZWindowsAudioPlayer::~JZWindowsAudioPlayer() { delete mpListener; delete AudioBuffer; @@ -211,7 +211,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::ShowError() +void JZWindowsAudioPlayer::ShowError() { const char* pMessage = 0; switch (mErrorCode) @@ -249,14 +249,14 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinAudioPlayer::LoadSamples(const char *filename) +int JZWindowsAudioPlayer::LoadSamples(const char *filename) { return mSamples.Load(filename); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinAudioPlayer::OpenDsp() +int JZWindowsAudioPlayer::OpenDsp() { int i; MMRESULT res; @@ -369,7 +369,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinAudioPlayer::CloseDsp() +int JZWindowsAudioPlayer::CloseDsp() { // todo: close the device immediately if open @@ -441,13 +441,13 @@ { if (wMsg == MM_WOM_DONE || wMsg == MM_WIM_DATA) { - ((tWinAudioPlayer *)dwUser)->AudioCallback(wMsg); + ((JZWindowsAudioPlayer *)dwUser)->AudioCallback(wMsg); } } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::AudioCallback(UINT wMsg) +void JZWindowsAudioPlayer::AudioCallback(UINT wMsg) { // async called by driver when the driver has processed a buffer completely EnterCriticalSection(&mutex); @@ -468,7 +468,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::StartAudio() +void JZWindowsAudioPlayer::StartAudio() { // async called by driver to start audio in sync with midi if (hout_open) @@ -487,7 +487,7 @@ // Description: // Send the sample set to driver. //----------------------------------------------------------------------------- -void tWinAudioPlayer::WriteBuffers() +void JZWindowsAudioPlayer::WriteBuffers() { if (audio_enabled && hout_open) { @@ -514,7 +514,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::Notify() +void JZWindowsAudioPlayer::Notify() { if (audio_enabled) { @@ -599,15 +599,15 @@ LeaveCriticalSection(&mutex); } // if (audio_enabled) - tWinIntPlayer::Notify(); + JZWindowsIntPlayer::Notify(); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::StartPlay(long Clock, long LoopClock, int Continue) +void JZWindowsAudioPlayer::StartPlay(long Clock, long LoopClock, int Continue) { mSamples.StartPlay(Clock); - tWinIntPlayer::StartPlay(Clock, LoopClock, Continue); + JZWindowsIntPlayer::StartPlay(Clock, LoopClock, Continue); if (!audio_enabled) return; @@ -625,9 +625,9 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::StopPlay() +void JZWindowsAudioPlayer::StopPlay() { - tWinIntPlayer::StopPlay(); + JZWindowsIntPlayer::StopPlay(); CloseDsp(); mSamples.StopPlay(); if (RecordMode()) @@ -646,7 +646,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::ListenAudio(int key, int start_stop_mode) +void JZWindowsAudioPlayer::ListenAudio(int key, int start_stop_mode) { if (!audio_enabled) { @@ -677,7 +677,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) +void JZWindowsAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) { if (!audio_enabled) return; @@ -694,7 +694,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinAudioPlayer::GetListenerPlayPosition() +long JZWindowsAudioPlayer::GetListenerPlayPosition() { if (!mpListener) { @@ -705,7 +705,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinAudioPlayer::RecordMode() const +int JZWindowsAudioPlayer::RecordMode() const { return rec_info != 0 && rec_info->mpTrack->GetAudioMode(); } Modified: trunk/jazz/src/mswin/WindowsAudioInterface.h =================================================================== --- trunk/jazz/src/mswin/WindowsAudioInterface.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/mswin/WindowsAudioInterface.h 2008-04-13 00:18:54 UTC (rev 458) @@ -29,10 +29,11 @@ #include "Audio.h" #include "WindowsMidiInterface.h" - class tSample; -class tWinAudioPlayer : public tWinIntPlayer +//***************************************************************************** +//***************************************************************************** +class JZWindowsAudioPlayer : public JZWindowsIntPlayer { friend class tAudioListener; @@ -51,9 +52,9 @@ ErrCapSync }; - tWinAudioPlayer(JZSong* pSong); + JZWindowsAudioPlayer(JZSong* pSong); - virtual ~tWinAudioPlayer(); + virtual ~JZWindowsAudioPlayer(); int LoadSamples(const char *filename); @@ -67,7 +68,7 @@ virtual int Installed() { - return installed && tWinIntPlayer::Installed(); + return installed && JZWindowsIntPlayer::Installed(); } virtual int GetAudioEnabled() const @@ -134,8 +135,8 @@ int CloseDsp(); // 0 = ok int installed; - int audio_enabled; // 0 means midi only - long blocks_played; // # of blocks written to device + int audio_enabled; // 0 means midi only + long blocks_played; // # of blocks written to device int play_buffers_needed; // driver requests more output buffers long start_clock; // when did play start Modified: trunk/jazz/src/mswin/WindowsMidiInterface.h =================================================================== --- trunk/jazz/src/mswin/WindowsMidiInterface.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/mswin/WindowsMidiInterface.h 2008-04-13 00:18:54 UTC (rev 458) @@ -48,7 +48,7 @@ ); } -class tWinAudioPlayer; +class JZWindowsAudioPlayer; // pseudo data word of struct midi_event, values must be less // than 128 to be distinguished from a midi status @@ -348,7 +348,7 @@ tMidiQueue play_buffer; tMidiQueue thru_buffer; - tWinAudioPlayer* audio_player; + JZWindowsAudioPlayer* audio_player; long time_correction; tWinSysexBufferArray* isx_buffers; Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-13 00:18:54 UTC (rev 458) @@ -45,7 +45,7 @@ //***************************************************************************** //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -tWinPlayer::tWinPlayer(JZSong* pSong) +JZWindowsPlayer::JZWindowsPlayer(JZSong* pSong) : JZPlayer(pSong) { poll_millisec = 25; @@ -161,14 +161,14 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinPlayer::Installed() +int JZWindowsPlayer::Installed() { return timer_installed && state->hout; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -tWinPlayer::~tWinPlayer() +JZWindowsPlayer::~JZWindowsPlayer() { if (state->hinp) { @@ -193,14 +193,14 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::SetSoftThru(int on, int InputDevice, int OutputDevice) +void JZWindowsPlayer::SetSoftThru(int on, int InputDevice, int OutputDevice) { state->soft_thru = on; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -JZEvent *tWinPlayer::Dword2Event(DWORD dw) +JZEvent *JZWindowsPlayer::Dword2Event(DWORD dw) { union { @@ -250,7 +250,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -DWORD tWinPlayer::Event2Dword(JZEvent *e) +DWORD JZWindowsPlayer::Event2Dword(JZEvent *e) { union { @@ -355,7 +355,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinPlayer::Clock2Time(long clock) +long JZWindowsPlayer::Clock2Time(long clock) { if (clock < state->start_clock) return state->start_time; @@ -365,7 +365,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinPlayer::Time2Clock(long time) +long JZWindowsPlayer::Time2Clock(long time) { if (time < state->start_time) return state->start_clock; @@ -376,7 +376,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::SetTempo(long bpm, long clock) +void JZWindowsPlayer::SetTempo(long bpm, long clock) { long t1 = Clock2Time(clock); state->ticks_per_minute = (long)bpm * (long)Song->TicksPerQuarter; @@ -386,7 +386,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinPlayer::RealTimeClock2Time(long clock) +long JZWindowsPlayer::RealTimeClock2Time(long clock) { if (clock < state->start_clock) return real_start_time; @@ -395,7 +395,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinPlayer::Time2RealTimeClock(long time) +long JZWindowsPlayer::Time2RealTimeClock(long time) { if (time < real_start_time) return state->start_clock; @@ -404,7 +404,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::SetRealTimeTempo(long bpm, long clock) +void JZWindowsPlayer::SetRealTimeTempo(long bpm, long clock) { long t1 = RealTimeClock2Time(clock); real_ticks_per_minute = (long)bpm * (long)Song->TicksPerQuarter; @@ -414,7 +414,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinPlayer::OutSysex(JZEvent *e, DWORD time) +int JZWindowsPlayer::OutSysex(JZEvent *e, DWORD time) { tSysEx *sx = e->IsSysEx(); if (sx == 0) @@ -433,7 +433,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinPlayer::OutEvent(JZEvent *e) +int JZWindowsPlayer::OutEvent(JZEvent *e) { DWORD d = Event2Dword(e); if (d) @@ -449,7 +449,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int tWinMidiPlayer::OutEvent(JZEvent *e) +int JZWindowsMidiPlayer::OutEvent(JZEvent *e) { DWORD d = Event2Dword(e); if (d) @@ -466,7 +466,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::OutNow(JZEvent* pEvent) +void JZWindowsPlayer::OutNow(JZEvent* pEvent) { DWORD d = Event2Dword(pEvent); if (d) @@ -503,7 +503,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::OutNow(tParam *r) +void JZWindowsPlayer::OutNow(tParam *r) { OutNow(&r->Msb); OutNow(&r->Lsb); @@ -512,7 +512,9 @@ OutNow(&r->ResetLsb); } -void tWinPlayer::FillMidiClocks(long to) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZWindowsPlayer::FillMidiClocks(long to) { while (midiClockOut <= to) { @@ -525,7 +527,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::OutBreak(long clock) +void JZWindowsPlayer::OutBreak(long clock) { if (gpConfig->GetValue(C_RealTimeOut)) { @@ -540,7 +542,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinMidiPlayer::OutBreak(long clock) +void JZWindowsMidiPlayer::OutBreak(long clock) { if (gpConfig->GetValue(C_RealTimeOut)) { @@ -555,7 +557,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::OutBreak() +void JZWindowsPlayer::OutBreak() { OutBreak(OutClock); } @@ -587,7 +589,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::StartPlay(long Clock, long LoopClock, int Continue) +void JZWindowsPlayer::StartPlay(long Clock, long LoopClock, int Continue) { state->play_buffer.clear(); state->recd_buffer.clear(); @@ -696,7 +698,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::StopPlay() +void JZWindowsPlayer::StopPlay() { wxBeginBusyCursor(); state->playing = FALSE; @@ -750,7 +752,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::FlushToDevice() +void JZWindowsPlayer::FlushToDevice() // try to send all events up to OutClock to device { if (gpConfig->GetValue(C_RealTimeOut)) @@ -763,7 +765,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::FlushToDevice(long clock) +void JZWindowsPlayer::FlushToDevice(long clock) { tEventIterator Iterator(&mPlayBuffer); JZEvent* pEvent = Iterator.Range(0, clock); @@ -782,7 +784,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinIntPlayer::GetRealTimeClock() +long JZWindowsIntPlayer::GetRealTimeClock() { while (!state->recd_buffer.empty()) { @@ -826,7 +828,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinMidiPlayer::GetRealTimeClock() +long JZWindowsMidiPlayer::GetRealTimeClock() { long clock; @@ -880,7 +882,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -long tWinMtcPlayer::GetRealTimeClock() +long JZWindowsMtcPlayer::GetRealTimeClock() { long clock; @@ -960,7 +962,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinMtcPlayer::InitMtcRec() +void JZWindowsMtcPlayer::InitMtcRec() { state->doing_mtc_rec = TRUE; StartPlay( 0, 0, 0 ); @@ -968,7 +970,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -tMtcTime* tWinMtcPlayer::FreezeMtcRec() +tMtcTime* JZWindowsMtcPlayer::FreezeMtcRec() { StopPlay(); state->doing_mtc_rec = FALSE; @@ -979,7 +981,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void tWinPlayer::SettingsDlg(long& InputDevice, long& OutputDevice) +void JZWindowsPlayer::SettingsDlg(long& InputDevice, long& OutputDevice) { vector<pair<string, int> > MidiDevices; Modified: trunk/jazz/src/mswin/WindowsPlayer.h =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.h 2008-04-11 17:26:33 UTC (rev 457) +++ trunk/jazz/src/mswin/WindowsPlayer.h 2008-04-13 00:18:54 UTC (rev 458) @@ -34,14 +34,14 @@ //***************************************************************************** //***************************************************************************** -class tWinPlayer : public JZPlayer +class JZWindowsPlayer : public JZPlayer { public: - tWinPlayer(JZSong* pSong); + JZWindowsPlayer(JZSong* pSong); int Installed(); - virtual ~tWinPlayer(); + virtual ~JZWindowsPlayer(); virtual int OutEvent(JZEvent* e); virtual int OutSysex(JZEvent* e, DWORD time); void OutNow(JZEvent *e); @@ -98,12 +98,12 @@ //***************************************************************************** //***************************************************************************** -class tWinIntPlayer : public tWinPlayer +class JZWindowsIntPlayer : public JZWindowsPlayer { public: - tWinIntPlayer(JZSong* pSong) - : tWinPlayer(pSong) + JZWindowsIntPlayer(JZSong* pSong) + : JZWindowsPlayer(pSong) { } @@ -112,27 +112,27 @@ //***************************************************************************** //***************************************************************************** -class tWinMidiPlayer : public tWinPlayer +class JZWindowsMidiPlayer : public JZWindowsPlayer { public: - tWinMidiPlayer(JZSong* pSong) - : tWinPlayer(pSong) + JZWindowsMidiPlayer(JZSong* pSong) + : JZWindowsPlayer(pSong) { } virtual long GetRealTimeClock(); - virtual int OutEvent(JZEvent *e); + virtual int OutEvent(JZEvent* pEvent); virtual void OutBreak(long clock); }; //***************************************************************************** //***************************************************************************** -class tWinMtcPlayer : public tWinPlayer +class JZWindowsMtcPlayer : public JZWindowsPlayer { public: - tWinMtcPlayer(JZSong* pSong) - : tWinPlayer(pSong) + JZWindowsMtcPlayer(JZSong* pSong) + : JZWindowsPlayer(pSong) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |