cwIoMidiRecordPlay.h/cpp : Added elapsed_micros().

This commit is contained in:
kevin 2023-02-26 13:40:49 -05:00
parent 41bac85d94
commit a35d91f73e
2 changed files with 12 additions and 1 deletions

View File

@ -150,7 +150,7 @@ namespace cw
event_callback_t cb;
void* cb_arg;
} midi_record_play_t;
enum
@ -1599,6 +1599,15 @@ cw::rc_t cw::midi_record_play::seek( handle_t h, time::spec_t seek_timestamp )
return rc;
}
unsigned cw::midi_record_play::elapsed_micros( handle_t h )
{
midi_record_play_t* p = _handleToPtr(h);
time::spec_t t;
time::get(t);
return time::elapsedMicros( p->start_time, t );
}
unsigned cw::midi_record_play::event_count( handle_t h )
{
midi_record_play_t* p = _handleToPtr(h);

View File

@ -56,6 +56,8 @@ namespace cw
rc_t load( handle_t h, const midi_msg_t* msg, unsigned msg_count );
rc_t seek( handle_t h, time::spec_t timestamp );
unsigned elapsed_micros( handle_t h );
unsigned event_count( handle_t h ); // Current count of stored messages.
unsigned event_index( handle_t h ); // record mode: index of next event to store play mode:index of next event to play