Skip to content

Commit b2b7725

Browse files
author
lathoub
committed
added end() method, stop'ping the UDP sockets
anticipating an update in the underlying MIDI library to call the end() method
1 parent ae9daba commit b2b7725

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/AppleMIDI.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ class AppleMIDISession
5555
#endif
5656
};
5757

58+
virtual ~AppleMIDISession()
59+
{
60+
61+
};
62+
5863
void setHandleConnected (void (*fptr)(const ssrc_t&, const char*)) { _connectedCallback = fptr; }
5964
void setHandleDisconnected (void (*fptr)(const ssrc_t&)) { _disconnectedCallback = fptr; }
6065
#ifdef USE_EXT_CALLBACKS
@@ -114,6 +119,12 @@ class AppleMIDISession
114119
rtpMidiClock.Init(rtpMidiClock.Now(), MIDI_SAMPLING_RATE_DEFAULT);
115120
}
116121

122+
void end()
123+
{
124+
controlPort.stop();
125+
dataPort.stop();
126+
}
127+
117128
bool beginTransmission(MIDI_NAMESPACE::MidiType)
118129
{
119130
// All MIDI commands queued up in the same cycle (during 1 loop execution)

0 commit comments

Comments
 (0)