cwIoAudioMidi.cpp,cwIoMidiRecordPlay.cpp,cwIoMinTest.cpp : Updates to account for 'asyncFl' now implemented in cwIo API
This commit is contained in:
parent
f8dc859b87
commit
56f50f903c
@ -978,6 +978,7 @@ cw::rc_t cw::io::audio_midi::main( const object_t* cfg )
|
|||||||
|
|
||||||
rc_t rc;
|
rc_t rc;
|
||||||
app_t app = {};
|
app_t app = {};
|
||||||
|
bool asyncFl = true;
|
||||||
|
|
||||||
if((rc = _parseCfg(&app,cfg)) != kOkRC )
|
if((rc = _parseCfg(&app,cfg)) != kOkRC )
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
@ -987,7 +988,7 @@ cw::rc_t cw::io::audio_midi::main( const object_t* cfg )
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
// create the MIDI playback timer
|
// 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.");
|
cwLogError(rc,"Audio-MIDI timer create failed.");
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
|
@ -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 )
|
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;
|
midi_record_play_t* p = nullptr;
|
||||||
rc_t rc;
|
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
|
// 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.");
|
cwLogError(rc,"Audio-MIDI timer create failed.");
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
|
@ -88,18 +88,19 @@ cw::rc_t cw::min_test( const object_t* cfg )
|
|||||||
rc_t rc;
|
rc_t rc;
|
||||||
app_t app = {};
|
app_t app = {};
|
||||||
|
|
||||||
|
bool asyncFl = true;
|
||||||
|
|
||||||
// create the io framework instance
|
// create the io framework instance
|
||||||
if((rc = create(app.ioH,cfg,minTestCb,&app)) != kOkRC )
|
if((rc = create(app.ioH,cfg,minTestCb,&app)) != kOkRC )
|
||||||
return rc;
|
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.");
|
rc = cwLogError(rc,"Thread 0 create failed.");
|
||||||
goto errLabel;
|
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.");
|
rc = cwLogError(rc,"Thread 1 create failed.");
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
|
Loading…
Reference in New Issue
Block a user