mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
make Mackie::Surface keep a reference to the input source+channel and clean up in destructor
This commit is contained in:
parent
ce03b02a79
commit
7e10c21468
3 changed files with 47 additions and 6 deletions
|
|
@ -92,6 +92,8 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
|
|||
, _master_fader (0)
|
||||
, _last_master_gain_written (-0.0f)
|
||||
, connection_state (0)
|
||||
, input_channel (0)
|
||||
, input_source (0)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "Surface::Surface init\n");
|
||||
|
||||
|
|
@ -162,6 +164,16 @@ Surface::~Surface ()
|
|||
|
||||
port_connection.disconnect ();
|
||||
|
||||
if (input_source) {
|
||||
g_source_destroy (input_source);
|
||||
input_source = 0;
|
||||
}
|
||||
|
||||
if (input_channel) {
|
||||
g_io_channel_unref (input_channel);
|
||||
input_channel = 0;
|
||||
}
|
||||
|
||||
delete _jog_wheel;
|
||||
delete _port;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue