cwIoAudioMidi.cpp,cwIoMidiRecordPlay.cpp,cwIoMinTest.cpp : Updates to account for 'asyncFl' now implemented in cwIo API

This commit is contained in:
kevin 2022-12-12 12:21:45 -05:00
parent f8dc859b87
commit 56f50f903c
3 changed files with 7 additions and 4 deletions

View File

@ -978,6 +978,7 @@ cw::rc_t cw::io::audio_midi::main( const object_t* cfg )
rc_t rc;
app_t app = {};
bool asyncFl = true;
if((rc = _parseCfg(&app,cfg)) != kOkRC )
goto errLabel;
@ -987,7 +988,7 @@ cw::rc_t cw::io::audio_midi::main( const object_t* cfg )
return rc;
// create the MIDI playback timer
if((rc = timerCreate( app.ioH, "am_timer", kAmMidiTimerId, app.midi_timer_period_micro_sec)) != kOkRC )
if((rc = timerCreate( app.ioH, "am_timer", kAmMidiTimerId, app.midi_timer_period_micro_sec, asyncFl)) != kOkRC )
{
cwLogError(rc,"Audio-MIDI timer create failed.");
goto errLabel;

View File

@ -1065,6 +1065,7 @@ namespace cw
cw::rc_t cw::midi_record_play::create( handle_t& hRef, io::handle_t ioH, const object_t& cfg, event_callback_t cb, void* cb_arg )
{
bool asyncFl = true;
midi_record_play_t* p = nullptr;
rc_t rc;
@ -1113,7 +1114,7 @@ cw::rc_t cw::midi_record_play::create( handle_t& hRef, io::handle_t ioH, const o
}
// create the MIDI playback timer
if((rc = timerCreate( p->ioH, TIMER_LABEL, kMidiRecordPlayTimerId, p->midi_timer_period_micro_sec)) != kOkRC )
if((rc = timerCreate( p->ioH, TIMER_LABEL, kMidiRecordPlayTimerId, p->midi_timer_period_micro_sec, asyncFl)) != kOkRC )
{
cwLogError(rc,"Audio-MIDI timer create failed.");
goto errLabel;

View File

@ -88,18 +88,19 @@ cw::rc_t cw::min_test( const object_t* cfg )
rc_t rc;
app_t app = {};
bool asyncFl = true;
// create the io framework instance
if((rc = create(app.ioH,cfg,minTestCb,&app)) != kOkRC )
return rc;
if((rc = threadCreate( app.ioH, kThread0Id, &app )) != kOkRC )
if((rc = threadCreate( app.ioH, kThread0Id, asyncFl, &app )) != kOkRC )
{
rc = cwLogError(rc,"Thread 0 create failed.");
goto errLabel;
}
if((rc = threadCreate( app.ioH, kThread1Id, &app )) != kOkRC )
if((rc = threadCreate( app.ioH, kThread1Id, asyncFl, &app )) != kOkRC )
{
rc = cwLogError(rc,"Thread 1 create failed.");
goto errLabel;