diff --git a/examples/custom_backend.c b/examples/custom_backend.c index 8a066d1b..504c967e 100644 --- a/examples/custom_backend.c +++ b/examples/custom_backend.c @@ -295,7 +295,8 @@ static ma_result ma_context_get_device_info__sdl(ma_context* pContext, ma_device tempDeviceID = ((MA_PFN_SDL_OpenAudioDevice)pContextEx->sdl.SDL_OpenAudioDevice)(pDeviceName, (deviceType == ma_device_type_playback) ? 0 : 1, &desiredSpec, &obtainedSpec, MA_SDL_AUDIO_ALLOW_ANY_CHANGE); if (tempDeviceID == 0) { - return ma_context_post_error(pContext, NULL, MA_LOG_LEVEL_ERROR, "Failed to open SDL device.", MA_FAILED_TO_OPEN_BACKEND_DEVICE); + ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "Failed to open SDL device."); + return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } ((MA_PFN_SDL_CloseAudioDevice)pContextEx->sdl.SDL_CloseAudioDevice)(tempDeviceID); @@ -402,7 +403,8 @@ static ma_result ma_device_init_internal__sdl(ma_device_ex* pDeviceEx, const ma_ deviceID = ((MA_PFN_SDL_OpenAudioDevice)pContextEx->sdl.SDL_OpenAudioDevice)(pDeviceName, (pConfig->deviceType == ma_device_type_playback) ? 0 : 1, &desiredSpec, &obtainedSpec, MA_SDL_AUDIO_ALLOW_ANY_CHANGE); if (deviceID == 0) { - return ma_post_error((ma_device*)pDeviceEx, MA_LOG_LEVEL_ERROR, "Failed to open SDL2 device.", MA_FAILED_TO_OPEN_BACKEND_DEVICE); + ma_log_postf(ma_device_get_log((ma_device*)pDeviceEx), MA_LOG_LEVEL_ERROR, "Failed to open SDL2 device."); + return MA_FAILED_TO_OPEN_BACKEND_DEVICE; } if (pConfig->deviceType == ma_device_type_playback) { @@ -647,7 +649,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin pSineWave = (ma_waveform*)pDevice->pUserData; MA_ASSERT(pSineWave != NULL); - ma_waveform_read_pcm_frames(pSineWave, pOutput, frameCount); + ma_waveform_read_pcm_frames(pSineWave, pOutput, frameCount, NULL); } if (pDevice->type == ma_device_type_duplex) { diff --git a/examples/fixed_size_callback.c b/examples/fixed_size_callback.c index 16097665..aa6f584d 100644 --- a/examples/fixed_size_callback.c +++ b/examples/fixed_size_callback.c @@ -35,7 +35,7 @@ void data_callback_fixed(ma_device* pDevice, void* pOutput, const void* pInput, */ printf("frameCount=%d\n", frameCount); - ma_waveform_read_pcm_frames(&g_sineWave, pOutput, frameCount); + ma_waveform_read_pcm_frames(&g_sineWave, pOutput, frameCount, NULL); /* Unused in this example. */ (void)pDevice; diff --git a/examples/simple_capture.c b/examples/simple_capture.c index 0fef18c0..e3b18248 100644 --- a/examples/simple_capture.c +++ b/examples/simple_capture.c @@ -19,7 +19,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin ma_encoder* pEncoder = (ma_encoder*)pDevice->pUserData; MA_ASSERT(pEncoder != NULL); - ma_encoder_write_pcm_frames(pEncoder, pInput, frameCount); + ma_encoder_write_pcm_frames(pEncoder, pInput, frameCount, NULL); (void)pOutput; } diff --git a/examples/simple_playback_sine.c b/examples/simple_playback_sine.c index 02a842a4..9258c08c 100644 --- a/examples/simple_playback_sine.c +++ b/examples/simple_playback_sine.c @@ -40,7 +40,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin pSineWave = (ma_waveform*)pDevice->pUserData; MA_ASSERT(pSineWave != NULL); - ma_waveform_read_pcm_frames(pSineWave, pOutput, frameCount); + ma_waveform_read_pcm_frames(pSineWave, pOutput, frameCount, NULL); (void)pInput; /* Unused. */ }