aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/midi/quicktime.cpp18
-rw-r--r--sound/softsynth/mt32/part.h1
2 files changed, 10 insertions, 9 deletions
diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp
index 91eab310e2..43ccb47fe9 100644
--- a/backends/midi/quicktime.cpp
+++ b/backends/midi/quicktime.cpp
@@ -67,19 +67,19 @@ private:
};
MidiDriver_QT::MidiDriver_QT() {
- qtNoteAllocator = NULL;
+ qtNoteAllocator = 0;
for (int i = 0; i < 16; i++)
- qtNoteChannel[i] = NULL;
+ qtNoteChannel[i] = 0;
}
int MidiDriver_QT::open() {
ComponentResult qtErr = noErr;
- if (qtNoteAllocator != NULL)
+ if (qtNoteAllocator != 0)
return MERR_ALREADY_OPEN;
qtNoteAllocator = OpenDefaultComponent(kNoteAllocatorComponentType, 0);
- if (qtNoteAllocator == NULL)
+ if (qtNoteAllocator == 0)
goto bail;
simpleNoteRequest.info.flags = 0;
@@ -92,7 +92,7 @@ int MidiDriver_QT::open() {
for (int i = 0; i < 16; i++) {
qtErr = NANewNoteChannel(qtNoteAllocator, &simpleNoteRequest, &(qtNoteChannel[i]));
- if ((qtErr != noErr) || (qtNoteChannel[i] == NULL))
+ if ((qtErr != noErr) || (qtNoteChannel[i] == 0))
goto bail;
qtErr = NAResetNoteChannel(qtNoteAllocator, qtNoteChannel[i]);
@@ -234,14 +234,14 @@ void MidiDriver_QT::setPitchBendRange (byte channel, uint range) {
void MidiDriver_QT::dispose()
{
for (int i = 0; i < 16; i++) {
- if (qtNoteChannel[i] != NULL)
+ if (qtNoteChannel[i] != 0)
NADisposeNoteChannel(qtNoteAllocator, qtNoteChannel[i]);
- qtNoteChannel[i] = NULL;
+ qtNoteChannel[i] = 0;
}
- if (qtNoteAllocator != NULL) {
+ if (qtNoteAllocator != 0) {
CloseComponent(qtNoteAllocator);
- qtNoteAllocator = NULL;
+ qtNoteAllocator = 0;
}
}
diff --git a/sound/softsynth/mt32/part.h b/sound/softsynth/mt32/part.h
index 1a32818ec0..8a5612e32d 100644
--- a/sound/softsynth/mt32/part.h
+++ b/sound/softsynth/mt32/part.h
@@ -68,6 +68,7 @@ protected:
public:
Part(Synth *synth, unsigned int usePartNum);
+ virtual ~Part() {}
virtual void playNote(unsigned int key, int vel);
void stopNote(unsigned int key);
void allNotesOff();