cwIoMidiRecordPlay.h/cpp: Added 'actionId' to callback function.

This commit is contained in:
kevin 2022-05-21 09:26:23 -04:00
parent 09e371ba93
commit 7c567ff1c8
2 changed files with 10 additions and 2 deletions

View File

@ -341,7 +341,7 @@ namespace cw
}
if( !after_stop_time_fl and p->cb )
p->cb( p->cb_arg, id, timestamp, loc, ch, status, d0, d1 );
p->cb( p->cb_arg, kMidiEventActionId, id, timestamp, loc, ch, status, d0, d1 );
if( log_fl && p->logOutFl )
{
@ -739,6 +739,9 @@ namespace cw
}
if( p->cb != nullptr )
p->cb( p->cb_arg, kPlayerStoppedActionId, kInvalidId, t1, kInvalidId, 0, 0, 0, 0 );
return rc;
}

View File

@ -19,8 +19,13 @@ namespace cw
uint8_t d1;
} midi_msg_t;
enum {
kMidiEventActionId,
kPlayerStoppedActionId
};
typedef void (*event_callback_t)( void* arg, unsigned id, const time::spec_t timestamp, unsigned loc, uint8_t ch, uint8_t status, uint8_t d0, uint8_t d1 );
typedef void (*event_callback_t)( void* arg, unsigned actionId, unsigned id, const time::spec_t timestamp, unsigned loc, uint8_t ch, uint8_t status, uint8_t d0, uint8_t d1 );
rc_t create( handle_t& hRef, io::handle_t ioH, const object_t& cfg, event_callback_t cb=nullptr, void* cb_arg=nullptr );