|
From: <pst...@us...> - 2010-07-17 03:49:59
|
Revision: 795
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=795&view=rev
Author: pstieber
Date: 2010-07-17 03:49:51 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
Prefixed class names with JZ instead of t.
Modified Paths:
--------------
trunk/jazz/src/AboutDialog.cpp
trunk/jazz/src/AboutDialog.h
trunk/jazz/src/AlsaDriver.cpp
trunk/jazz/src/AlsaDriver.h
trunk/jazz/src/AlsaPlayer.cpp
trunk/jazz/src/AlsaPlayer.h
trunk/jazz/src/AlsaThru.cpp
trunk/jazz/src/AlsaThru.h
trunk/jazz/src/AsciiMidiFile.cpp
trunk/jazz/src/AsciiMidiFile.h
trunk/jazz/src/Audio.cpp
trunk/jazz/src/Audio.h
trunk/jazz/src/AudioDriver.cpp
trunk/jazz/src/AudioDriver.h
trunk/jazz/src/ClockDialog.cpp
trunk/jazz/src/ClockDialog.h
trunk/jazz/src/Command.cpp
trunk/jazz/src/Command.h
trunk/jazz/src/Configuration.cpp
trunk/jazz/src/Configuration.h
trunk/jazz/src/ControlEdit.cpp
trunk/jazz/src/ControlEdit.h
trunk/jazz/src/DeprecatedStringUtils.cpp
trunk/jazz/src/DeprecatedStringUtils.h
trunk/jazz/src/Dialogs/AudioSettingsDialog.cpp
trunk/jazz/src/Dialogs/AudioSettingsDialog.h
trunk/jazz/src/Dialogs/SamplesDialog.cpp
trunk/jazz/src/Dialogs/SamplesDialog.h
trunk/jazz/src/Dialogs/copyDialog.cpp
trunk/jazz/src/Dialogs/copyDialog.h
trunk/jazz/src/Dialogs/copyright.cpp
trunk/jazz/src/Dialogs/copyright.h
trunk/jazz/src/Dialogs/midiThruDialog.cpp
trunk/jazz/src/Dialogs/midiThruDialog.h
trunk/jazz/src/Dialogs/midiTiming.cpp
trunk/jazz/src/Dialogs/midiTiming.h
trunk/jazz/src/Dialogs/songSettings.cpp
trunk/jazz/src/Dialogs/songSettings.h
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Dialogs.h
trunk/jazz/src/DynamicArray.cpp
trunk/jazz/src/DynamicArray.h
trunk/jazz/src/ErrorMessage.cpp
trunk/jazz/src/ErrorMessage.h
trunk/jazz/src/EventWindow.cpp
trunk/jazz/src/FileSelector.cpp
trunk/jazz/src/FileSelector.h
trunk/jazz/src/Filter.cpp
trunk/jazz/src/Filter.h
trunk/jazz/src/FindFile.cpp
trunk/jazz/src/FindFile.h
trunk/jazz/src/FrequencyTable.cpp
trunk/jazz/src/FrequencyTable.h
trunk/jazz/src/Globals.cpp
trunk/jazz/src/Globals.h
trunk/jazz/src/GuitarFrame.h
trunk/jazz/src/GuitarSettings.cpp
trunk/jazz/src/GuitarSettings.h
trunk/jazz/src/GuitarSettingsDialog.cpp
trunk/jazz/src/GuitarSettingsDialog.h
trunk/jazz/src/Harmony.cpp
trunk/jazz/src/Harmony.h
trunk/jazz/src/HarmonyBrowserAnalyzer.cpp
trunk/jazz/src/HarmonyBrowserAnalyzer.h
trunk/jazz/src/HarmonyP.cpp
trunk/jazz/src/HarmonyP.h
trunk/jazz/src/Help.cpp
trunk/jazz/src/Help.h
trunk/jazz/src/JazzPlusPlusApplication.cpp
trunk/jazz/src/JazzPlusPlusApplication.h
trunk/jazz/src/KeyStringConverters.cpp
trunk/jazz/src/KeyStringConverters.h
trunk/jazz/src/Mapper.cpp
trunk/jazz/src/Mapper.h
trunk/jazz/src/MeasureChoice.cpp
trunk/jazz/src/MeasureChoice.h
trunk/jazz/src/Metronome.cpp
trunk/jazz/src/Metronome.h
trunk/jazz/src/MidiDeviceDialog.cpp
trunk/jazz/src/MidiDeviceDialog.h
trunk/jazz/src/MouseAction.cpp
trunk/jazz/src/MouseAction.h
trunk/jazz/src/NamedChoice.cpp
trunk/jazz/src/NamedChoice.h
trunk/jazz/src/NamedValue.cpp
trunk/jazz/src/NamedValue.h
trunk/jazz/src/NamedValueChoice.cpp
trunk/jazz/src/NamedValueChoice.h
trunk/jazz/src/PianoFrame.cpp
trunk/jazz/src/PianoFrame.h
trunk/jazz/src/PianoWindow.cpp
trunk/jazz/src/PianoWindow.h
trunk/jazz/src/Player.cpp
trunk/jazz/src/Player.h
trunk/jazz/src/PortMidiPlayer.cpp
trunk/jazz/src/PortMidiPlayer.h
trunk/jazz/src/Project.cpp
trunk/jazz/src/Project.h
trunk/jazz/src/PropertyListDialog.cpp
trunk/jazz/src/PropertyListDialog.h
trunk/jazz/src/Random.cpp
trunk/jazz/src/Random.h
trunk/jazz/src/RecordingInfo.cpp
trunk/jazz/src/RecordingInfo.h
trunk/jazz/src/Rectangle.cpp
trunk/jazz/src/Rectangle.h
trunk/jazz/src/ResourceDialog.h
trunk/jazz/src/Rhythm.cpp
trunk/jazz/src/Rhythm.h
trunk/jazz/src/Sample.cpp
trunk/jazz/src/Sample.h
trunk/jazz/src/SampleCommand.cpp
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/SelectControllerDialog.cpp
trunk/jazz/src/SelectControllerDialog.h
trunk/jazz/src/Signal2.cpp
trunk/jazz/src/Signal2.h
trunk/jazz/src/SignalInterface.h
trunk/jazz/src/SliderWindow.cpp
trunk/jazz/src/SliderWindow.h
trunk/jazz/src/Song.cpp
trunk/jazz/src/Song.h
trunk/jazz/src/StandardFile.cpp
trunk/jazz/src/StandardFile.h
trunk/jazz/src/StringReadWrite.cpp
trunk/jazz/src/StringReadWrite.h
trunk/jazz/src/Synth.cpp
trunk/jazz/src/Synth.h
trunk/jazz/src/ToolBar.cpp
trunk/jazz/src/ToolBar.h
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
trunk/jazz/src/TrackFrame.h
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/commands/copyCommand.cpp
trunk/jazz/src/commands/copyCommand.h
trunk/jazz/src/midinet.h
trunk/jazz/src/mswin/WindowsAudioInterface.cpp
trunk/jazz/src/mswin/WindowsAudioInterface.h
trunk/jazz/src/mswin/WindowsConsole.cpp
trunk/jazz/src/mswin/WindowsConsole.h
trunk/jazz/src/mswin/WindowsMidiInterface.cpp
trunk/jazz/src/mswin/WindowsMidiInterface.h
trunk/jazz/src/mswin/WindowsPlayer.cpp
trunk/jazz/src/mswin/WindowsPlayer.h
trunk/jazz/src/mswin/config.h
Modified: trunk/jazz/src/AboutDialog.cpp
===================================================================
--- trunk/jazz/src/AboutDialog.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AboutDialog.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Modified: trunk/jazz/src/AboutDialog.h
===================================================================
--- trunk/jazz/src/AboutDialog.h 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AboutDialog.h 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Modified: trunk/jazz/src/AlsaDriver.cpp
===================================================================
--- trunk/jazz/src/AlsaDriver.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaDriver.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
#define MAX_FRAGS 16 // enough large?
-class tAlsaAudioListener : public wxTimer
+class JZAlsaAudioListener : public wxTimer
{
public:
- tAlsaAudioListener(tAlsaAudioPlayer* pPlayer, int key)
+ JZAlsaAudioListener(JZAlsaAudioPlayer* pPlayer, int key)
: wxTimer(),
mpPlayer(pPlayer),
mHardExit(true)
@@ -61,14 +61,14 @@
// SYNC seems not to work?? so add 8 more silent buffers
// to hear the end of the sample too.
- mpPlayer->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0);
+ mpPlayer->OpenDsp(JZAlsaAudioPlayer::PLAYBACK, 0);
mCount = 8 + mpPlayer->mSamples.PrepareListen(key);
Start(20);
}
- tAlsaAudioListener(
- tAlsaAudioPlayer* pPlayer,
- tSample& spl,
+ JZAlsaAudioListener(
+ JZAlsaAudioPlayer* pPlayer,
+ JZSample& spl,
long fr_smpl,
long to_smpl)
: wxTimer(),
@@ -79,17 +79,17 @@
mpPlayer->mpRecordingInfo = 0; // not recording!
mpPlayer->running_mode = 0;
- mpPlayer->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0);
+ mpPlayer->OpenDsp(JZAlsaAudioPlayer::PLAYBACK, 0);
mpPlayer->mSamples.ResetBufferSize(
- mpPlayer->frag_byte_size[tAlsaAudioPlayer::PLAYBACK]);
+ mpPlayer->frag_byte_size[JZAlsaAudioPlayer::PLAYBACK]);
mCount = 8 + mpPlayer->mSamples.PrepareListen(&spl, fr_smpl, to_smpl);
Start(20);
}
- ~tAlsaAudioListener()
+ ~JZAlsaAudioListener()
{
Stop();
mpPlayer->CloseDsp(mHardExit);
@@ -109,12 +109,12 @@
long GetPlayPosition()
{
- return mpPlayer->GetCurrentPosition(tAlsaAudioPlayer::PLAYBACK);
+ return mpPlayer->GetCurrentPosition(JZAlsaAudioPlayer::PLAYBACK);
}
private:
- tAlsaAudioPlayer* mpPlayer;
+ JZAlsaAudioPlayer* mpPlayer;
int mCount;
@@ -122,10 +122,10 @@
};
-tAlsaAudioPlayer::tAlsaAudioPlayer(JZSong* pSong)
- : tAlsaPlayer(pSong)
+JZAlsaAudioPlayer::JZAlsaAudioPlayer(JZSong* pSong)
+ : JZAlsaPlayer(pSong)
{
- mpAudioBuffer = new tEventArray();
+ mpAudioBuffer = new JZEventArray();
mInstalled = false;
mAudioEnabled = false;
mpListener = 0;
@@ -143,7 +143,7 @@
}
-tAlsaAudioPlayer::~tAlsaAudioPlayer()
+JZAlsaAudioPlayer::~JZAlsaAudioPlayer()
{
delete mpListener;
delete mpAudioBuffer;
@@ -160,27 +160,27 @@
}
-int tAlsaAudioPlayer::LoadSamples(const char *filename)
+int JZAlsaAudioPlayer::LoadSamples(const char *filename)
{
return mSamples.Load(filename);
}
-int tAlsaAudioPlayer::RecordMode() const
+int JZAlsaAudioPlayer::RecordMode() const
{
return running_mode & (1 << CAPTURE);
}
-int tAlsaAudioPlayer::PlayBackMode() const
+int JZAlsaAudioPlayer::PlayBackMode() const
{
return running_mode & (1 << PLAYBACK);
}
-void tAlsaAudioPlayer::StartPlay(long clock, long loopClock, int cont)
+void JZAlsaAudioPlayer::StartPlay(long clock, long loopClock, int cont)
{
delete mpListener;
mSamples.StartPlay(clock);
- tAlsaPlayer::StartPlay(clock, loopClock, cont);
+ JZAlsaPlayer::StartPlay(clock, loopClock, cont);
if (!mAudioEnabled)
{
return;
@@ -226,7 +226,7 @@
}
-void tAlsaAudioPlayer::StartAudio()
+void JZAlsaAudioPlayer::StartAudio()
{
if (pcm[PLAYBACK])
{
@@ -239,7 +239,7 @@
}
-void tAlsaAudioPlayer::OpenDsp(int mode, int sync_mode)
+void JZAlsaAudioPlayer::OpenDsp(int mode, int sync_mode)
{
if (!mAudioEnabled)
{
@@ -361,7 +361,7 @@
}
-void tAlsaAudioPlayer::CloseDsp(bool Reset)
+void JZAlsaAudioPlayer::CloseDsp(bool Reset)
{
if (pcm)
{
@@ -405,7 +405,7 @@
}
}
-void tAlsaAudioPlayer::Notify()
+void JZAlsaAudioPlayer::Notify()
{
if (mAudioEnabled)
{
@@ -429,11 +429,11 @@
MidiSync();
}
}
- tAlsaPlayer::Notify();
+ JZAlsaPlayer::Notify();
}
// number of frames (or bytes) free
-int tAlsaAudioPlayer::GetFreeSpace(int mode)
+int JZAlsaAudioPlayer::GetFreeSpace(int mode)
{
snd_pcm_status_t *info;
snd_pcm_status_alloca(&info);
@@ -446,7 +446,7 @@
}
-int tAlsaAudioPlayer::WriteSamples()
+int JZAlsaAudioPlayer::WriteSamples()
{
if (!mAudioEnabled || pcm[PLAYBACK] == NULL)
{
@@ -460,7 +460,7 @@
for (; room > frag_size[PLAYBACK]; room -= frag_size[PLAYBACK])
{
- tAudioBuffer *buf = mSamples.full_buffers.Get();
+ JZAudioBuffer* buf = mSamples.full_buffers.Get();
if (buf == 0)
{
break;
@@ -495,7 +495,7 @@
}
-void tAlsaAudioPlayer::ReadSamples()
+void JZAlsaAudioPlayer::ReadSamples()
{
if (!mAudioEnabled || pcm[CAPTURE] == NULL)
{
@@ -517,9 +517,9 @@
}
-void tAlsaAudioPlayer::ResetPlay(long clock)
+void JZAlsaAudioPlayer::ResetPlay(long clock)
{
- tAlsaPlayer::ResetPlay(clock);
+ JZAlsaPlayer::ResetPlay(clock);
if (pcm[PLAYBACK])
{
snd_pcm_drop(pcm[PLAYBACK]);
@@ -530,12 +530,12 @@
cur_pos = 0;
}
-long tAlsaAudioPlayer::GetCurrentPosition(int mode)
+long JZAlsaAudioPlayer::GetCurrentPosition(int mode)
{
return cur_scount;
}
-void tAlsaAudioPlayer::MidiSync()
+void JZAlsaAudioPlayer::MidiSync()
{
if (!mAudioEnabled)
{
@@ -613,10 +613,10 @@
}
}
-void tAlsaAudioPlayer::StopPlay()
+void JZAlsaAudioPlayer::StopPlay()
{
mSamples.StopPlay();
- tAlsaPlayer::StopPlay();
+ JZAlsaPlayer::StopPlay();
if (!mAudioEnabled)
{
return;
@@ -640,7 +640,7 @@
recbuffers.Clear();
}
-void tAlsaAudioPlayer::ListenAudio(int key, int start_stop_mode)
+void JZAlsaAudioPlayer::ListenAudio(int key, int start_stop_mode)
{
if (!mAudioEnabled)
{
@@ -667,10 +667,10 @@
return;
}
- mpListener = new tAlsaAudioListener(this, key);
+ mpListener = new JZAlsaAudioListener(this, key);
}
-void tAlsaAudioPlayer::ListenAudio(tSample& spl, long fr_smpl, long to_smpl)
+void JZAlsaAudioPlayer::ListenAudio(JZSample& spl, long fr_smpl, long to_smpl)
{
if (!mAudioEnabled)
{
@@ -688,10 +688,10 @@
{
return;
}
- mpListener = new tAlsaAudioListener(this, spl, fr_smpl, to_smpl);
+ mpListener = new JZAlsaAudioListener(this, spl, fr_smpl, to_smpl);
}
-long tAlsaAudioPlayer::GetListenerPlayPosition()
+long JZAlsaAudioPlayer::GetListenerPlayPosition()
{
if (!mpListener)
{
Modified: trunk/jazz/src/AlsaDriver.h
===================================================================
--- trunk/jazz/src/AlsaDriver.h 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaDriver.h 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,22 +30,22 @@
#include <sys/time.h>
-class tSample;
-class tAlsaAudioListener;
+class JZSample;
+class JZAlsaAudioListener;
-class tAlsaAudioPlayer : public tAlsaPlayer
+class JZAlsaAudioPlayer : public JZAlsaPlayer
{
- friend class tAlsaAudioListener;
+ friend class JZAlsaAudioListener;
public:
- tAlsaAudioPlayer(JZSong *song);
- virtual ~tAlsaAudioPlayer();
+ JZAlsaAudioPlayer(JZSong *song);
+ virtual ~JZAlsaAudioPlayer();
int LoadSamples(const char *filename);
virtual void Notify();
virtual void StartPlay(long Clock, long LoopClock = 0, int Continue = 0);
virtual void StopPlay();
virtual bool IsInstalled()
{
- return mInstalled && tAlsaPlayer::IsInstalled();
+ return mInstalled && JZAlsaPlayer::IsInstalled();
}
virtual bool GetAudioEnabled() const
{
@@ -56,7 +56,7 @@
mAudioEnabled = AudioEnabled;
}
virtual void ListenAudio(int key, int start_stop_mode = 1);
- virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl);
+ virtual void ListenAudio(JZSample &spl, long fr_smpl, long to_smpl);
virtual bool IsListening() const
{
return mpListener != 0;
@@ -111,8 +111,8 @@
int frame_shift[2];
long frame_boundary[2];
- tAlsaAudioListener* mpListener;
- tAudioRecordBuffer recbuffers;
+ JZAlsaAudioListener* mpListener;
+ JZAudioRecordBuffer recbuffers;
};
#endif // !defined(JZ_ALSADRIVER_H)
Modified: trunk/jazz/src/AlsaPlayer.cpp
===================================================================
--- trunk/jazz/src/AlsaPlayer.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaPlayer.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tAlsaPlayer::tAlsaPlayer(JZSong* pSong)
+JZAlsaPlayer::JZAlsaPlayer(JZSong* pSong)
: JZPlayer(pSong)
{
ithru = othru = 0;
@@ -77,7 +77,7 @@
snd_seq_poll_descriptors(handle, &pfds, 1, POLLIN|POLLOUT);
//JAVE seqfd doesnt seem to be used for anything, not here nor in the base
- // class JZPlayer(but heavily in tSeq2Player)
+ // class JZPlayer(but heavily in JZSeq2Player)
// seqfd = pfds.fd;
// create my input/output port
@@ -192,7 +192,7 @@
if (mInstalled)
{
- thru = new tAlsaThru();
+ thru = new JZAlsaThru();
SetSoftThru(
gpConfig->GetValue(C_SoftThru),
gpConfig->GetValue(C_ThruInput),
@@ -202,14 +202,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::clear_input_queue()
+void JZAlsaPlayer::clear_input_queue()
{
snd_seq_drop_input(handle);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::set_pool_sizes()
+void JZAlsaPlayer::set_pool_sizes()
{
if (snd_seq_set_client_pool_output(handle, 2000) < 0)
{
@@ -227,7 +227,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::SetSoftThru(int on, int idev, int odev)
+void JZAlsaPlayer::SetSoftThru(int on, int idev, int odev)
{
if (idev != ithru || odev != othru)
{
@@ -285,7 +285,7 @@
// Description:
// Connect output addrs/queue with my client/oport.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::subscribe_out(int outp)
+void JZAlsaPlayer::subscribe_out(int outp)
{
if (
snd_seq_connect_to(
@@ -302,7 +302,7 @@
// Description:
// Connect input addrs/queue with my client/iport
//-----------------------------------------------------------------------------
-void tAlsaPlayer::subscribe_inp(int inp)
+void JZAlsaPlayer::subscribe_inp(int inp)
{
snd_seq_port_subscribe_t* subs;
snd_seq_port_subscribe_alloca(&subs);
@@ -320,7 +320,7 @@
// Description:
// Disconnect output addrs/queue with my client/oport.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::unsubscribe_out(int outp)
+void JZAlsaPlayer::unsubscribe_out(int outp)
{
if (
snd_seq_disconnect_to(
@@ -337,7 +337,7 @@
// Description:
// Connect input addrs/queue with my client/iport
//-----------------------------------------------------------------------------
-void tAlsaPlayer::unsubscribe_inp(int inp)
+void JZAlsaPlayer::unsubscribe_inp(int inp)
{
snd_seq_port_subscribe_t *subs;
snd_seq_port_subscribe_alloca(&subs);
@@ -355,7 +355,7 @@
// Description:
// Set the name of this client.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::set_client_info(snd_seq_t *handle, const char *name)
+void JZAlsaPlayer::set_client_info(snd_seq_t *handle, const char *name)
{
if (snd_seq_set_client_name(handle, (char *)name) < 0)
{
@@ -367,7 +367,7 @@
// Description:
// Create a new port.
//-----------------------------------------------------------------------------
-int tAlsaPlayer::create_port(snd_seq_t *handle, const char *name)
+int JZAlsaPlayer::create_port(snd_seq_t *handle, const char *name)
{
return snd_seq_create_simple_port(
handle,
@@ -381,14 +381,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-bool tAlsaPlayer::IsInstalled()
+bool JZAlsaPlayer::IsInstalled()
{
return mInstalled;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tAlsaPlayer::~tAlsaPlayer()
+JZAlsaPlayer::~JZAlsaPlayer()
{
if (thru)
{
@@ -402,7 +402,7 @@
// 0 = event successfully sent to driver
// 1 = try again later
//-----------------------------------------------------------------------------
-int tAlsaPlayer::OutEvent(JZEvent* pEvent, int now)
+int JZAlsaPlayer::OutEvent(JZEvent* pEvent, int now)
{
int rc = 0;
snd_seq_event_t ev;
@@ -518,7 +518,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::OutBreak()
+void JZAlsaPlayer::OutBreak()
{
OutBreak(mOutClock);
}
@@ -528,7 +528,7 @@
// "echos" are used to synchronize. They are supposed to be read later by
// the Notify call chain.
//-----------------------------------------------------------------------------
-int tAlsaPlayer::compose_echo(int clock, unsigned int arg)
+int JZAlsaPlayer::compose_echo(int clock, unsigned int arg)
{
snd_seq_event_t ev;
memset(&ev, 0, sizeof(ev));
@@ -543,7 +543,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::OutBreak(long clock)
+void JZAlsaPlayer::OutBreak(long clock)
{
while (echo_clock + 48 < clock)
{
@@ -559,7 +559,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::StartPlay(long clock, long loopClock, int cont)
+void JZAlsaPlayer::StartPlay(long clock, long loopClock, int cont)
{
recd_clock = clock;
echo_clock = clock;
@@ -573,7 +573,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::ResetPlay(long clock)
+void JZAlsaPlayer::ResetPlay(long clock)
{
// Purge queues.
snd_seq_drop_output_buffer(handle);
@@ -591,12 +591,12 @@
// Notify is periodically called by the timer. It will output events to the
// output buffer, and update play_clock and recd_clock
//-----------------------------------------------------------------------------
-void tAlsaPlayer::Notify()
+void JZAlsaPlayer::Notify()
{
// called by timer
long Now = GetRealTimeClock();
- cout << "tAlsaPlayer::Notify " << Now << ' ' << play_clock << endl;
+ cout << "JZAlsaPlayer::Notify " << Now << ' ' << play_clock << endl;
if (Now < 0)
{
@@ -607,7 +607,7 @@
{
// rewind..
// clear and rebuild
- cout << "tAlsaPlayer::Notify rewind" << endl;
+ cout << "JZAlsaPlayer::Notify rewind" << endl;
ResetPlay(Now);
mPlayBuffer.Clear();
mOutClock = Now + FIRST_DELTACLOCK;
@@ -657,7 +657,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::set_event_header(snd_seq_event_t *ev, long clock, int type)
+void JZAlsaPlayer::set_event_header(snd_seq_event_t *ev, long clock, int type)
{
memset(ev, 0, sizeof(*ev));
snd_seq_ev_set_source(ev, self.port);
@@ -669,7 +669,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::set_event_header(
+void JZAlsaPlayer::set_event_header(
snd_seq_event_t *ev,
long clock,
int len,
@@ -686,7 +686,7 @@
// Description:
// Initialize the alsa timer.
//-----------------------------------------------------------------------------
-int tAlsaPlayer::start_timer(long clock)
+int JZAlsaPlayer::start_timer(long clock)
{
int time_base = mpSong->GetTicksPerQuarter();
int cur_speed = mpSong->GetTrack(0)->GetCurrentSpeed(clock);
@@ -699,7 +699,7 @@
// Description:
// Set initial tempo.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::init_queue_tempo(int time_base, int bpm)
+void JZAlsaPlayer::init_queue_tempo(int time_base, int bpm)
{
snd_seq_queue_tempo_t *qtempo;
snd_seq_queue_tempo_alloca(&qtempo);
@@ -716,7 +716,7 @@
// Immediately start the alsa queue timer. Do this by sending an "start"
// event to the queue.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::start_queue_timer(long clock)
+void JZAlsaPlayer::start_queue_timer(long clock)
{
stop_queue_timer(); // to be sure
@@ -729,17 +729,17 @@
rv = write(&ev, 1);
if (rv < 0)
{
- cout << "tAlsaPlayer::start_queue_timer write failed" << endl;
+ cout << "JZAlsaPlayer::start_queue_timer write failed" << endl;
}
snd_seq_ev_set_queue_continue(&ev, queue);
rv = write(&ev, 1);
if (rv < 0)
{
- cout << "tAlsaPlayer::start_queue_timer write failed" << endl;
+ cout << "JZAlsaPlayer::start_queue_timer write failed" << endl;
}
cout
- << "tAlsaPlayer::start_queue_timer added trial-and-error start_queue"
+ << "JZAlsaPlayer::start_queue_timer added trial-and-error start_queue"
<< endl;
snd_seq_start_queue(handle, queue, NULL);
@@ -749,7 +749,7 @@
// Description:
// Immediately stop the timer, by sending a stop event to the alsa queue.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::stop_queue_timer()
+void JZAlsaPlayer::stop_queue_timer()
{
snd_seq_event_t ev;
memset(&ev, 0, sizeof(ev));
@@ -767,7 +767,7 @@
// int:
// returns a negative value on failure.
//-----------------------------------------------------------------------------
-int tAlsaPlayer::write(snd_seq_event_t *ev, int now)
+int JZAlsaPlayer::write(snd_seq_event_t *ev, int now)
{
if (now)
{
@@ -784,14 +784,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::flush_output()
+void JZAlsaPlayer::flush_output()
{
snd_seq_drain_output(handle);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tAlsaPlayer::set_blocking_mode(int enable)
+int JZAlsaPlayer::set_blocking_mode(int enable)
{
int rc;
@@ -805,7 +805,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::StopPlay()
+void JZAlsaPlayer::StopPlay()
{
JZPlayer::StopPlay();
ResetPlay(0);
@@ -818,7 +818,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaPlayer::StartAudio()
+void JZAlsaPlayer::StartAudio()
{
}
@@ -827,12 +827,12 @@
// Called from GetRealTimeClock. Parses events in the queue. Sets
// recd_clock, from event time stamps.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::recd_event(snd_seq_event_t* ev)
+void JZAlsaPlayer::recd_event(snd_seq_event_t* ev)
{
JZEvent* pEvent = 0;
cout
- << "tAlsaPlayer::recd_event got " << (int)ev->type
+ << "JZAlsaPlayer::recd_event got " << (int)ev->type
<< " (echo is " << SND_SEQ_EVENT_ECHO << ')'
<< endl;
@@ -938,7 +938,7 @@
// looking at time stamps on events in the queue, and also updates the
// display, so the name is not well chosen.
//-----------------------------------------------------------------------------
-long tAlsaPlayer::GetRealTimeClock()
+long JZAlsaPlayer::GetRealTimeClock()
{
// input recorded events (including my echo events)
snd_seq_event_t *ie;
@@ -960,8 +960,8 @@
// Description:
// This function goes through each client, and each port on each client.
//-----------------------------------------------------------------------------
-void tAlsaPlayer::scan_clients(
- tAlsaDeviceList& DeviceList,
+void JZAlsaPlayer::scan_clients(
+ JZAlsaDeviceList& DeviceList,
unsigned DeviceCapabilities)
{
snd_seq_client_info_t *cinfo;
@@ -1001,7 +1001,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tAlsaPlayer::FindMidiDevice()
+int JZAlsaPlayer::FindMidiDevice()
{
if (mInputDeviceIndex != -1)
{
@@ -1035,8 +1035,8 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tAlsaPlayer::select_list(
- tAlsaDeviceList& list,
+int JZAlsaPlayer::select_list(
+ JZAlsaDeviceList& list,
const char* title,
int def_device)
{
@@ -1076,7 +1076,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAlsaDeviceList::AsciiWrite(const string& Message)
+void JZAlsaDeviceList::AsciiWrite(const string& Message)
{
cout << Message << endl;
int i = 0;
@@ -1094,7 +1094,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-unsigned tAlsaDeviceList::add(const char* pName, const snd_seq_addr_t& a)
+unsigned JZAlsaDeviceList::add(const char* pName, const snd_seq_addr_t& a)
{
mDeviceNames.push_back(pName);
addr.push_back(a);
@@ -1103,7 +1103,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-snd_seq_addr_t& tAlsaDeviceList::operator[](unsigned i)
+snd_seq_addr_t& JZAlsaDeviceList::operator[](unsigned i)
{
if (i >= addr.size())
{
Modified: trunk/jazz/src/AlsaPlayer.h
===================================================================
--- trunk/jazz/src/AlsaPlayer.h 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaPlayer.h 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
#include <string>
-class tAlsaDeviceList : public tDeviceList
+class JZAlsaDeviceList : public JZDeviceList
{
public:
unsigned add(const char* pName, const snd_seq_addr_t& a);
@@ -42,12 +42,12 @@
-class tAlsaPlayer : public JZPlayer
+class JZAlsaPlayer : public JZPlayer
{
- friend class tAlsaThru;
+ friend class JZAlsaThru;
public:
- tAlsaPlayer(JZSong *song);
- virtual ~tAlsaPlayer();
+ JZAlsaPlayer(JZSong *song);
+ virtual ~JZAlsaPlayer();
void Notify();
bool IsInstalled();
@@ -60,7 +60,7 @@
{
OutEvent(e, 1);
}
- void OutNow(tParam *r);
+ void OutNow(JZParam *r);
void OutBreak();
void OutBreak(long BreakOver);
void StartPlay(long Clock, long LoopClock = 0, int Continue = 0);
@@ -71,11 +71,11 @@
{
return 1;
}
- virtual tDeviceList & GetOutputDevices()
+ virtual JZDeviceList & GetOutputDevices()
{
return oaddr;
}
- virtual tDeviceList & GetInputDevices()
+ virtual JZDeviceList & GetInputDevices()
{
return iaddr;
}
@@ -91,8 +91,8 @@
protected:
snd_seq_t *handle;
- tAlsaDeviceList iaddr; // addresses of input devices
- tAlsaDeviceList oaddr; // addresses of output devices
+ JZAlsaDeviceList iaddr; // addresses of input devices
+ JZAlsaDeviceList oaddr; // addresses of output devices
int client; // me
snd_seq_addr_t self; // my address
int queue; // queue
@@ -111,9 +111,9 @@
void thru_connect();
void thru_disconnect();
void scan_clients(
- tAlsaDeviceList& Devicelist,
+ JZAlsaDeviceList& Devicelist,
unsigned DeviceCapabilities);
- int select_list(tAlsaDeviceList &list, const char *title, int def_device);
+ int select_list(JZAlsaDeviceList &list, const char *title, int def_device);
int start_timer(long clock);
int write(snd_seq_event_t *ev)
{
@@ -144,7 +144,7 @@
long recd_clock; // clock received so far from recorded events or echo events
long echo_clock; // echo events have been sent up to this clock
- tAlsaThru *thru;
+ JZAlsaThru *thru;
int ithru, othru; // index in iaddr, oaddr of source/target device
};
Modified: trunk/jazz/src/AlsaThru.cpp
===================================================================
--- trunk/jazz/src/AlsaThru.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaThru.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@
** with wxwin) that copies from input to output.
*/
-tAlsaThru::tAlsaThru()
+JZAlsaThru::JZAlsaThru()
{
running = 0;
}
-tAlsaThru::~tAlsaThru()
+JZAlsaThru::~JZAlsaThru()
{
// Calling Stop() caused the creation of an unkillable process on Mandriva
// 2008.0.
@@ -67,7 +67,7 @@
}
-void tAlsaThru::connect(snd_seq_addr_t &src, snd_seq_addr_t &dest)
+void JZAlsaThru::connect(snd_seq_addr_t &src, snd_seq_addr_t &dest)
{
snd_seq_port_subscribe_t *subs;
snd_seq_port_subscribe_alloca(&subs);
@@ -77,7 +77,7 @@
perror("subscribe");
}
-void tAlsaThru::disconnect(snd_seq_addr_t &src, snd_seq_addr_t &dest)
+void JZAlsaThru::disconnect(snd_seq_addr_t &src, snd_seq_addr_t &dest)
{
snd_seq_port_subscribe_t* subs;
snd_seq_port_subscribe_alloca(&subs);
@@ -89,14 +89,14 @@
}
}
-void tAlsaThru::initialize()
+void JZAlsaThru::initialize()
{
if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0 ) < 0)
{
perror("open");
exit(1);
}
- tAlsaPlayer::set_client_info(handle, "Jazz++ Midi Thru");
+ JZAlsaPlayer::set_client_info(handle, "Jazz++ Midi Thru");
if (snd_seq_nonblock(handle, 0) < 0)
{
@@ -105,7 +105,7 @@
}
self.client = snd_seq_client_id(handle);
- self.port = tAlsaPlayer::create_port(handle, "Input/Output");
+ self.port = JZAlsaPlayer::create_port(handle, "Input/Output");
#ifndef USE_DIRECT_CONNECTION
connect(source, self);
connect(self, destin);
@@ -114,7 +114,7 @@
#ifdef USE_DIRECT_CONNECTION
-void tAlsaThru::Start()
+void JZAlsaThru::Start()
{
if (! running)
{
@@ -126,7 +126,7 @@
}
// disconnect midi-thru
-void tAlsaThru::Stop()
+void JZAlsaThru::Stop()
{
if (running)
{
@@ -139,7 +139,7 @@
#else // USE_DIRECT_CONNECTION
-void tAlsaThru::loop()
+void JZAlsaThru::loop()
{
snd_seq_event_t *ev;
while (snd_seq_event_input(handle, &ev) >= 0 && ev != 0)
@@ -162,7 +162,7 @@
// thread version
-void tAlsaThru::stopworker(int sig)
+void JZAlsaThru::stopworker(int sig)
{
running = 0;
snd_seq_close(handle);
@@ -170,23 +170,23 @@
}
-void * tAlsaThru::startworker(void *p)
+void * JZAlsaThru::startworker(void *p)
{
running = 1;
signal(SIGHUP, stopworker);
- tAlsaThru *thru = (tAlsaThru *)p;
+ JZAlsaThru *thru = (JZAlsaThru *)p;
thru->initialize();
thru->loop();
return 0;
}
-void tAlsaThru::Start()
+void JZAlsaThru::Start()
{
if (!running)
pthread_create(&worker, (void *)0, startworker, (void *)this);
}
-void tAlsaThru::Stop()
+void JZAlsaThru::Stop()
{
if (running)
pthread_kill(worker, SIGHUP);
@@ -200,13 +200,13 @@
static snd_seq_t *static_handle; // ugly!!
-void tAlsaThru::stopworker(int sig)
+void JZAlsaThru::stopworker(int sig)
{
snd_seq_close(static_handle);
exit(0);
}
-void tAlsaThru::Start()
+void JZAlsaThru::Start()
{
if (!running)
{
@@ -230,7 +230,7 @@
}
}
-void tAlsaThru::Stop()
+void JZAlsaThru::Stop()
{
if (running)
{
Modified: trunk/jazz/src/AlsaThru.h
===================================================================
--- trunk/jazz/src/AlsaThru.h 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AlsaThru.h 2010-07-17 03:49:51 UTC (rev 795)
@@ -3,7 +3,7 @@
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
// Modifications Copyright (C) 2004 Patrick Earl
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -41,12 +41,12 @@
// does not work together with wxwin $%!
// #include <pthread.h>
-class tAlsaThru
+class JZAlsaThru
{
public:
- tAlsaThru();
- virtual ~tAlsaThru();
+ JZAlsaThru();
+ virtual ~JZAlsaThru();
void SetSource(int client, int port)
{
Modified: trunk/jazz/src/AsciiMidiFile.cpp
===================================================================
--- trunk/jazz/src/AsciiMidiFile.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AsciiMidiFile.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -2,7 +2,7 @@
// The JAZZ++ Midi Sequencer
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Modified: trunk/jazz/src/AsciiMidiFile.h
===================================================================
--- trunk/jazz/src/AsciiMidiFile.h 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/AsciiMidiFile.h 2010-07-17 03:49:51 UTC (rev 795)
@@ -2,7 +2,7 @@
// The JAZZ++ Midi Sequencer
//
// Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved.
-// Modifications Copyright (C) 2008 Peter J. Stieber
+// Modifications Copyright (C) 2008-2010 Peter J. Stieber
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Modified: trunk/jazz/src/Audio.cpp
===================================================================
--- trunk/jazz/src/Audio.cpp 2010-07-13 05:18:08 UTC (rev 794)
+++ trunk/jazz/src/Audio.cpp 2010-07-17 03:49:51 UTC (rev 795)
@@ -60,19 +60,19 @@
//*****************************************************************************
// Description:
// This is the sample voice class declaration. This class is activated via a
-// MIDI note on signal. The class copies data from a tSample object to the
+// MIDI note on signal. The class copies data from a JZSample object to the
// output buffer as needed by the driver.
//*****************************************************************************
-class tSampleVoice
+class JZSampleVoice
{
public:
- tSampleVoice(tSampleSet& s)
+ JZSampleVoice(JZSampleSet& s)
: set(s)
{
}
- void Start(tSample *s, long c)
+ void Start(JZSample *s, long c)
{
spl = s;
clock = c;
@@ -175,9 +175,9 @@
}
private:
- tSampleSet& set;
+ JZSampleSet& set;
long clock;
- tSample* spl;
+ JZSample* spl;
short* data;
int first;
long length;
@@ -188,7 +188,7 @@
//*****************************************************************************
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tSampleSet::tSampleSet(long tpm)
+JZSampleSet::JZSampleSet(long tpm)
: mSamplingRate(22050),
mChannelCount(1),
@@ -206,7 +206,7 @@
for (i = 0; i < BUFCOUNT; i++)
{
- buffers[i] = new tAudioBuffer(0);
+ buffers[i] = new JZAudioBuffer(0);
}
adjust_audio_length = 1;
@@ -216,26 +216,26 @@
for (i = 0; i < eSampleCount; i++)
{
- mSamples[i] = new tSample(*this);
- mSampleWindows[i] = 0;
+ mSamples[i] = new JZSample(*this);
+ mSampleFrames[i] = 0;
}
for (i = 0; i < MAXPOLY; i++)
{
- voices[i] = new tSampleVoice(*this);
+ voices[i] = new JZSampleVoice(*this);
}
num_voices = 0;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tSampleSet::~tSampleSet()
+JZSampleSet::~JZSampleSet()
{
int i;
for (i = 0; i < eSampleCount; i++)
{
delete mSamples[i];
- delete mSampleWindows[i];
+ delete mSampleFrames[i];
}
for (i = 0; i < MAXPOLY; i++)
{
@@ -249,24 +249,24 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::Edit(int key)
+void JZSampleSet::Edit(int key)
{
- if (mSampleWindows[key] == 0)
+ if (mSampleFrames[key] == 0)
{
- tSample* spl = mSamples[key];
+ JZSample* spl = mSamples[key];
- mSampleWindows[key] = new tSampleWin(
+ mSampleFrames[key] = new JZSampleFrame(
gpTrackWindow,
- &mSampleWindows[key],
+ &mSampleFrames[key],
*spl);
}
- mSampleWindows[key]->Show(true);
- mSampleWindows[key]->Redraw();
+ mSampleFrames[key]->Show(true);
+ mSampleFrames[key]->Redraw();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::LoadDefaultSettings()
+void JZSampleSet::LoadDefaultSettings()
{
wxString FileName = FindFile("jazz.spl");
if (!FileName.empty())
@@ -277,7 +277,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::Load(const wxString& FileName)
+int JZSampleSet::Load(const wxString& FileName)
{
// Enable audio when loading a sample set.
gpMidiPlayer->SetAudioEnabled(true);
@@ -337,9 +337,9 @@
<< '"';
::wxMessageBox(String, "Error", wxOK);
}
- if (mSampleWindows[key])
+ if (mSampleFrames[key])
{
- mSampleWindows[key]->Redraw();
+ mSampleFrames[key]->Redraw();
}
}
wxEndBusyCursor();
@@ -349,7 +349,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::ReloadSamples()
+void JZSampleSet::ReloadSamples()
{
for (int i = 0; i < eSampleCount; i++)
{
@@ -360,7 +360,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::Save(const wxString& FileName)
+int JZSampleSet::Save(const wxString& FileName)
{
ofstream Ofs(FileName.c_str());
Ofs
@@ -368,7 +368,7 @@
<< endl;
for (int i = 0; i < eSampleCount; i++)
{
- tSample* pSample = mSamples[i];
+ JZSample* pSample = mSamples[i];
const string& FileName = pSample->GetFileName();
int vol = pSample->GetVolume();
int pan = pSample->GetPan();
@@ -387,7 +387,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-const string& tSampleSet::GetSampleLabel(int Index)
+const string& JZSampleSet::GetSampleLabel(int Index)
{
if (Index >= 0 && Index < eSampleCount)
{
@@ -399,7 +399,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::ResetBuffers(tEventArray *evnt_arr, long clock, long tpm)
+int JZSampleSet::ResetBuffers(JZEventArray *evnt_arr, long clock, long tpm)
{
int i;
free_buffers.Clear();
@@ -423,7 +423,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::ResetBufferSize(unsigned int bufsize)
+int JZSampleSet::ResetBufferSize(unsigned int bufsize)
{
if (bufsize == 0 || bufsize > BUFBYTES || (bufsize & 1))
{
@@ -437,7 +437,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::FillBuffers(long last_clock)
+int JZSampleSet::FillBuffers(long last_clock)
{
// check if last_clock is bigger than free buffer space
// and compute the count of buffers that can be filled
@@ -488,7 +488,7 @@
// add remaining sample data to the buffers
for (i = 0; i < nfree; i++)
{
- tAudioBuffer *buf = free_buffers.Get();
+ JZAudioBuffer* buf = free_buffers.Get();
buf->Clear();
long buffer_clock = BufferClock(buffers_written + i);
@@ -509,7 +509,7 @@
{
if (voices[i]->Finished())
{
- tSampleVoice *v = voices[i];
+ JZSampleVoice *v = voices[i];
voices[i] = voices[num_voices-1];
voices[num_voices-1] = v;
num_voices--;
@@ -526,7 +526,7 @@
// Returns the number of buffers containing sound. Fills as many buffers as
// possible, the last buffers may contain silence only.
//-----------------------------------------------------------------------------
-int tSampleSet::PrepareListen(tSample *spl, long fr_smpl, long to_smpl)
+int JZSampleSet::PrepareListen(JZSample *spl, long fr_smpl, long to_smpl)
{
listen_sample = spl;
@@ -538,7 +538,7 @@
for (int i = 0; i < nfree; i++)
{
- tAudioBuffer *buf = free_buffers.Get();
+ JZAudioBuffer* buf = free_buffers.Get();
buf->Clear();
if (!voices[0]->Finished())
{
@@ -553,22 +553,22 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::PrepareListen(int key, long fr_smpl, long to_smpl)
+int JZSampleSet::PrepareListen(int key, long fr_smpl, long to_smpl)
{
- tSample *spl = mSamples[key];
+ JZSample *spl = mSamples[key];
return PrepareListen(spl, fr_smpl, to_smpl);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int tSampleSet::ContinueListen()
+int JZSampleSet::ContinueListen()
{
int nfree = free_buffers.Count();
int sound_buffers = 0;
for (int i = 0; i < nfree; i++)
{
- tAudioBuffer *buf = free_buffers.Get();
+ JZAudioBuffer* buf = free_buffers.Get();
buf->Clear();
if (!voices[0]->Finished())
{
@@ -583,14 +583,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::AdjustAudioLength(JZTrack *t, long tpm)
+void JZSampleSet::AdjustAudioLength(JZTrack *t, long tpm)
{
if (!t->GetAudioMode() || !adjust_audio_length)
return;
ticks_per_minute = tpm;
- tEventIterator it(t);
+ JZEventIterator it(t);
JZEvent *e = it.First();
while (e)
{
@@ -612,14 +612,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::StartPlay(long clock)
+void JZSampleSet::StartPlay(long clock)
{
ReloadSamples();
// touch all playback sample data, so they may get swapped into memory
for (int i = 0; i < eSampleCount; i++)
{
- tSample *spl = mSamples[i];
+ JZSample *spl = mSamples[i];
spl->GotoRAM();
}
@@ -628,7 +628,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::StopPlay()
+void JZSampleSet::StopPlay()
{
is_playing = 0;
}
@@ -638,15 +638,15 @@
// Description:
// This is the sample dialog.
//*****************************************************************************
-class tSamplesDlg : public wxDialog
+class JZSamplesDlg : public wxDialog
{
- friend class tSampleSet;
+ friend class JZSampleSet;
public:
- tSamplesDlg(wxWindow* pParent, tSampleSet& SampleSet);
+ JZSamplesDlg(wxWindow* pParent, JZSampleSet& SampleSet);
- ~tSamplesDlg();
+ ~JZSamplesDlg();
#ifdef OBSOLETE
static void CloseButton(wxItem &item, wxCommandEvent& event);
@@ -668,7 +668,7 @@
private:
- tSampleSet &set;
+ JZSampleSet &set;
wxListBox* mpListBox;
wxSlider* mpPanSlider;
@@ -691,10 +691,10 @@
#ifdef OBSOLETE
-class tAudioGloblForm : public wxForm
+class JZAudioGloblForm : public wxForm
{
public:
- tAudioGloblForm(tSampleSet &s)
+ JZAudioGloblForm(JZSampleSet &s)
: wxForm( USED_WXFORM_BUTTONS ),
mSampleSet(s)
{
@@ -803,7 +803,7 @@
wxForm::OnCancel();
}
private:
- tSampleSet& mSampleSet;
+ JZSampleSet& mSampleSet;
wxList strlist;
long speed;
@@ -820,7 +820,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::EditAudioGlobalSettings(wxWindow* pParent)
+void JZSampleSet::EditAudioGlobalSettings(wxWindow* pParent)
{
if (mpSampleDialog)
{
@@ -834,7 +834,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::EditAudioSamples(wxWindow* pParent)
+void JZSampleSet::EditAudioSamples(wxWindow* pParent)
{
SamplesDlg();
}
@@ -842,7 +842,7 @@
//-----------------------------------------------------------------------------
// case ID_AUDIO_LOAD_SAMPLE_SET:
//-----------------------------------------------------------------------------
-void tSampleSet::LoadSampleSet(wxWindow* pParent)
+void JZSampleSet::LoadSampleSet(wxWindow* pParent)
{
wxString FileName = file_selector(
mDefaultFileName,
@@ -859,7 +859,7 @@
//-----------------------------------------------------------------------------
// case ID_AUDIO_SAVE_SAMPLE_SET_AS:
//-----------------------------------------------------------------------------
-void tSampleSet::SaveSampleSetAs(wxWindow* pParent)
+void JZSampleSet::SaveSampleSetAs(wxWindow* pParent)
{
wxString FileName = file_selector(
mDefaultFileName,
@@ -876,7 +876,7 @@
//-----------------------------------------------------------------------------
// case ID_AUDIO_SAVE_SAMPLE_SET:
//-----------------------------------------------------------------------------
-void tSampleSet::SaveSampleSet(wxWindow* pParent)
+void JZSampleSet::SaveSampleSet(wxWindow* pParent)
{
if (mDefaultFileName == "noname.spl")
{
@@ -888,7 +888,7 @@
//-----------------------------------------------------------------------------
// case ID_AUDIO_NEW_SAMPLE_SET:
//-----------------------------------------------------------------------------
-void tSampleSet::ClearSampleSet(wxWindow* pParent)
+void JZSampleSet::ClearSampleSet(wxWindow* pParent)
{
if (mpSampleDialog == 0)
{
@@ -905,7 +905,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::SaveRecordingDlg(long frc, long toc, tAudioRecordBuffer &buf)
+void JZSampleSet::SaveRecordingDlg(long frc, long toc, JZAudioRecordBuffer &buf)
{
if (frc >= toc)
{
@@ -942,10 +942,10 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::AddNote(const string& FileName, long frc, long toc)
+void JZSampleSet::AddNote(const string& FileName, long frc, long toc)
{
int i;
- tSample *spl;
+ JZSample *spl;
// See if the file name is already present in sample list.
for (i = 0; i < eSampleCount; i++)
@@ -989,7 +989,7 @@
#ifdef OBSOLETE
pSong->NewUndoBuffer();
#endif
- tEventIterator iter(info->mpTrack);
+ JZEventIterator iter(info->mpTrack);
JZEvent *e = iter.Range(frc, toc);
while (e != 0)
{
@@ -1013,11 +1013,11 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSampleSet::SaveWave(
+void JZSampleSet::SaveWave(
const char *fname,
long frc,
long toc,
- tAudioRecordBuffer &buf)
+ JZAudioRecordBuffer &buf)
{
WaveHeader wh;
wh.main_chunk = RIFF;
@@ -1082,11 +1082,11 @@
// ------------------------------- record ------------------------
// -----------------------------------------------------------------
-DEFINE_ARRAY(tAudioBufferArray, tAudioBuffer *)
+DEFINE_ARRAY(JZAudioBufferArray, JZAudioBuffer *)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tAudioRecordBuffer::Clear()
+void JZAudioRecordBuffer::Clear()
{
int n = buffers.GetSize();
for (int i = 0; i < n; i++)
@@ -1099,10 +1099,10 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tAudioBuffer * tAudioRecordBuffer::RequestBuffer()
+JZAudioBuffer * JZAudioRecordBuffer::RequestBuffer()
{
if (buffers[num_buffers] == 0)
- buffers[num_buffers] = new tAudioBuffer(0);
+ buffers[num_buffers] = new JZAudioBuffer(0);
if (buffers[num_buffers] == 0)
{
Clear();
@@ -1118,12 +1118,12 @@
#if 0
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-char* tSamplesDlg::mpSamplePath = 0;
-int tSamplesDlg::current = 0;
+char* JZSamplesDlg::mpSamplePath = 0;
+int JZSamplesDlg::current = 0;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tSamplesDlg::tSamplesDlg(wxWindow* pParent, tSampleSet &s)
+JZSamplesDlg::JZSamplesDlg(wxWindow* pParent, JZSampleSet &s)
: wxDialog(pParent, wxID_ANY, wxString("Sample Settings")),
set(s)
{
@@ -1133,7 +1133,7 @@
}
wxArrayString SampleNames;
- for (int i = 0; i < tSampleSet::eSampleCount; ++i)
+ for (int i = 0; i < JZSampleSet::eSampleCount; ++i)
{
SampleNames.Add(ListEntry(i));
}
@@ -1183,7 +1183,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-char* tSamplesDlg::ListEntry(int i)
+char* JZSamplesDlg::ListEntry(int i)
{
ostringstream Oss;
Oss << i + 1 << ' ' << set.mSamples[i]->GetLabel();
@@ -1193,9 +1193,9 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::Sample2Win(int i)
+void JZSamplesDlg::Sample2Win(int i)
{
- tSample *spl = set.mSamples[i];
+ JZSample *spl = set.mSamples[i];
mpVolumeSlider->SetValue(spl->GetVolume());
mpPitchSlider->SetValue(spl->GetPitch());
mpPanSlider->SetValue(spl->GetPan());
@@ -1207,9 +1207,9 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::Win2Sample(int i)
+void JZSamplesDlg::Win2Sample(int i)
{
- tSample *spl = set.mSamples[i];
+ JZSample *spl = set.mSamples[i];
spl->SetPitch(mpPitchSlider->GetValue());
spl->SetVolume(mpVolumeSlider->GetValue());
spl->SetPan(mpPanSlider->GetValue());
@@ -1221,7 +1221,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::SetCurrentListEntry(int i)
+void JZSamplesDlg::SetCurrentListEntry(int i)
{
if (i >= 0)
{
@@ -1233,13 +1233,13 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tSamplesDlg::~tSamplesDlg()
+JZSamplesDlg::~JZSamplesDlg()
{
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnCloseButton()
+void JZSamplesDlg::OnCloseButton()
{
if (set.is_playing)
{
@@ -1256,7 +1256,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnAddButton()
+void JZSamplesDlg::OnAddButton()
{
wxString FileName = file_selector(
mpSamplePath,
@@ -1278,12 +1278,12 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnEditButton()
+void JZSamplesDlg::OnEditButton()
{
wxBeginBusyCursor();
Win2Sample(current);
SetCurrentListEntry(current);
- tSample *spl = set.mSamples[current];
+ JZSample *spl = set.mSamples[current];
spl->Load();
wxEndBusyCursor();
@@ -1292,7 +1292,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnPlayButton()
+void JZSamplesDlg::OnPlayButton()
{
if (set.is_playing)
{
@@ -1305,7 +1305,7 @@
}
Win2Sample(current);
SetCurrentListEntry(current);
- tSample *spl = set.mSamples[current];
+ JZSample *spl = set.mSamples[current];
wxBeginBusyCursor();
spl->Load();
gpMidiPlayer->ListenAudio(current);
@@ -1314,9 +1314,9 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnClrButton()
+void JZSamplesDlg::OnClrButton()
{
- tSample *spl = set.mSamples[current];
+ JZSample *spl = set.mSamples[current];
spl->Clear();
SetCurrentListEntry(current);
Sample2Win(current);
@@ -1324,14 +1324,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnHelpButton()
+void JZSamplesDlg::OnHelpButton()
{
gpHelpInstance->ShowTopic("Sample Settings");
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSamplesDlg::OnListClick()
+void JZSamplesDlg::OnListClick()
{
Win2Sample(current);
int i = mpListBox->GetSelection();
@@ -1345,40 +1345,40 @@
...
[truncated message content] |