diff --git a/cwAudioBuf.cpp b/cwAudioBuf.cpp index 20691e2..8f4458c 100644 --- a/cwAudioBuf.cpp +++ b/cwAudioBuf.cpp @@ -923,8 +923,9 @@ void cw::audio::buf::report(handle_t h) /// [cwAudioBufExample] -void cw::audio::buf::test() +cw::rc_t cw::audio::buf::test() { + rc_t rc = kOkRC; unsigned devIdx = 0; unsigned devCnt = 1 ; unsigned dspFrameCnt = 10; @@ -1021,6 +1022,8 @@ void cw::audio::buf::test() cwLogInfo("\n"); destroy(h); + + return rc; } /// [cwAudioBufExample] diff --git a/cwAudioBuf.h b/cwAudioBuf.h index d9c4ba5..def3e27 100644 --- a/cwAudioBuf.h +++ b/cwAudioBuf.h @@ -232,7 +232,7 @@ namespace cw void report( handle_t h ); // Run a buffer usage simulation to test the class. cmAudioPortTest.c calls this function. - void test(); + rc_t test(); //) diff --git a/cwAudioDeviceAlsa.cpp b/cwAudioDeviceAlsa.cpp index 804db8c..771dec1 100644 --- a/cwAudioDeviceAlsa.cpp +++ b/cwAudioDeviceAlsa.cpp @@ -1590,7 +1590,7 @@ void cw::audio::device::alsa::deviceRealTimeReport(struct driver_str* drv, unsig //) //[ -void cw::audio::device::alsa::report( handle_t h ) +cw::rc_t cw::audio::device::alsa::report( handle_t h ) { alsa_t* p = _handleToPtr(h); unsigned i; @@ -1603,17 +1603,21 @@ void cw::audio::device::alsa::report( handle_t h ) } snd_config_update_free_global(); + + return kOkRC; } -void cw::audio::device::alsa::report() +cw::rc_t cw::audio::device::alsa::report() { + rc_t rc = kOkRC; handle_t h; driver_t* d; if( create(h,d) == kOkRC ) { - report(h); + rc = report(h); destroy(h); } + return rc; } //] diff --git a/cwAudioDeviceAlsa.h b/cwAudioDeviceAlsa.h index 63f96bd..69b5271 100644 --- a/cwAudioDeviceAlsa.h +++ b/cwAudioDeviceAlsa.h @@ -26,8 +26,8 @@ namespace cw bool deviceIsStarted( struct driver_str* drv, unsigned devIdx ); void deviceRealTimeReport( struct driver_str* drv, unsigned devIdx ); - void report(handle_t h ); - void report(); + rc_t report(handle_t h ); + rc_t report(); } } }