X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fmidi%2B%2B2%2Fport.cc;h=629dff07969ba64b739dce6dfb724d53e997e71d;hb=e9752ff93ea44098fd8c02b21a3a787ef1cbf3ab;hp=90ec260eae1cb8822a0e12f2bfdbb66d715d2275;hpb=25a6296f865620d5013cd634e693f7179e7edc84;p=ardour.git diff --git a/libs/midi++2/port.cc b/libs/midi++2/port.cc index 90ec260eae..629dff0796 100644 --- a/libs/midi++2/port.cc +++ b/libs/midi++2/port.cc @@ -1,6 +1,6 @@ /* Copyright (C) 1998 Paul Barton-Davis - + 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 the Free Software Foundation; either version 2 of the License, or @@ -81,6 +81,8 @@ Port::~Port () for (int i = 0; i < 16; i++) { delete _channel[i]; } + + delete _parser; } /** Send a clock tick message. @@ -90,11 +92,11 @@ bool Port::clock (timestamp_t timestamp) { static byte clockmsg = 0xf8; - + if (sends_output()) { return midimsg (&clockmsg, 1, timestamp); } - + return false; } @@ -137,7 +139,7 @@ Port::Descriptor::Descriptor (const XMLNode& node) } } -XMLNode& +XMLNode& Port::get_state () const { XMLNode* root = new XMLNode (state_node_name); @@ -148,7 +150,7 @@ Port::get_state () const } else { root->add_property ("mode", "output"); } - + #if 0 byte device_inquiry[6]; @@ -158,7 +160,7 @@ Port::get_state () const device_inquiry[0] = 0x06; device_inquiry[0] = 0x02; device_inquiry[0] = 0xf7; - + write (device_inquiry, sizeof (device_inquiry), 0); #endif