Fixed gcc warnings, virtual destructor problem

svn-id: r7656
This commit is contained in:
Jamieson Christian 2003-05-19 00:12:16 +00:00
parent 1b410c50dd
commit 9cbc6904a0
3 changed files with 13 additions and 2 deletions

View File

@ -34,6 +34,8 @@ protected:
uint32 _timer_rate;
public:
virtual ~MidiParser() { }
virtual bool loadMusic (byte *data, uint32 size) = 0;
virtual void unloadMusic() = 0;

View File

@ -68,6 +68,8 @@ protected:
void allNotesOff();
public:
~MidiParser_SMF();
bool loadMusic (byte *data, uint32 size);
void unloadMusic();
@ -90,6 +92,11 @@ public:
//
//////////////////////////////////////////////////
MidiParser_SMF::~MidiParser_SMF() {
if (_buffer)
free (_buffer);
}
// This is the conventional (i.e. SMF) variable length quantity
uint32 MidiParser_SMF::readVLQ (byte * &data) {
byte str;
@ -481,7 +488,7 @@ void MidiParser_SMF::jumpToTick (uint32 tick) {
_play_time = 0;
_last_event_time = 0;
if (tick > 0) {
printf ("jumpToTick (%ld) not completely implemented!\n", tick);
printf ("jumpToTick (%ld) not completely implemented!\n", (long) tick);
playToTime (tick * _psec_per_tick - 1, false);
}
allNotesOff();

View File

@ -70,6 +70,8 @@ protected:
void playToTime (uint32 psec, bool transmit);
public:
~MidiParser_XMIDI() { }
bool loadMusic (byte *data, uint32 size);
void unloadMusic();
@ -458,7 +460,7 @@ void MidiParser_XMIDI::jumpToTick (uint32 tick) {
_play_time = 0;
_last_event_time = 0;
if (tick > 0) {
printf ("jumpToTick (%ld) not completely implemented!\n", tick);
printf ("jumpToTick (%ld) not completely implemented!\n", (long) tick);
playToTime (tick * MICROSECONDS_PER_TICK - 1, false);
}
}