returnmal_post_error(pDevice,"[WASAPI] Failed to retrieve internal buffer from playback device in preparation for sending new data to the device.",MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER);
return mal_post_error(pDevice, "[WASAPI] Failed to retrieve internal buffer from playback device in preparation for sending new data to the device.", MAL_FAILED_TO_MAP_DEVICE_BUFFER);
returnmal_post_error(pDevice,"[WASAPI] Failed to release internal buffer from playback device in preparation for sending new data to the device.",MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER);
return mal_post_error(pDevice, "[WASAPI] Failed to release internal buffer from playback device in preparation for sending new data to the device.", MAL_FAILED_TO_UNMAP_DEVICE_BUFFER);
mal_post_error(pDevice,"[WASAPI] WARNING: Failed to retrieve internal buffer from capture device in preparation for sending new data to the client.",MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER);
mal_post_error(pDevice, "[WASAPI] WARNING: Failed to retrieve internal buffer from capture device in preparation for sending new data to the client.", MAL_FAILED_TO_MAP_DEVICE_BUFFER);
mal_post_error(pDevice,"[WASAPI] WARNING: Failed to release internal buffer from capture device in preparation for sending new data to the client.",MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER);
mal_post_error(pDevice, "[WASAPI] WARNING: Failed to release internal buffer from capture device in preparation for sending new data to the client.", MAL_FAILED_TO_UNMAP_DEVICE_BUFFER);
// Notifications are set up via a DIRECTSOUNDNOTIFY object which is retrieved from the buffer.
// Notifications are set up via a DIRECTSOUNDNOTIFY object which is retrieved from the buffer.
if (FAILED(IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, _MAL_GUID_IID_DirectSoundNotify, (void**)&pDevice->dsound.pNotify))) {
if (FAILED(IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, _MAL_GUID_IID_DirectSoundNotify, (void**)&pDevice->dsound.pNotify))) {
mal_device_uninit__dsound(pDevice);
mal_device_uninit__dsound(pDevice);
returnmal_post_error(pDevice,"[DirectSound] IDirectSoundBuffer_QueryInterface() failed for playback device's IDirectSoundNotify object.",MAL_DSOUND_FAILED_TO_QUERY_INTERFACE);
if (((mal_snd_pcm_sw_params_set_avail_min_proc)pContext->alsa.snd_pcm_sw_params_set_avail_min)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) {
if (((mal_snd_pcm_sw_params_set_avail_min_proc)pContext->alsa.snd_pcm_sw_params_set_avail_min)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) {
...
@@ -7522,13 +7505,13 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
...
@@ -7522,13 +7505,13 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
if (type == mal_device_type_playback && !pDevice->alsa.isUsingMMap) { // Only playback devices in writei/readi mode need a start threshold.
if (type == mal_device_type_playback && !pDevice->alsa.isUsingMMap) { // Only playback devices in writei/readi mode need a start threshold.
if (((mal_snd_pcm_sw_params_set_start_threshold_proc)pContext->alsa.snd_pcm_sw_params_set_start_threshold)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) { //mal_prev_power_of_2(pDevice->bufferSizeInFrames/pDevice->periods)
if (((mal_snd_pcm_sw_params_set_start_threshold_proc)pContext->alsa.snd_pcm_sw_params_set_start_threshold)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) { //mal_prev_power_of_2(pDevice->bufferSizeInFrames/pDevice->periods)
mal_device_uninit__alsa(pDevice);
mal_device_uninit__alsa(pDevice);
returnmal_post_error(pDevice,"[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed.",MAL_ALSA_FAILED_TO_SET_SW_PARAMS);
return mal_post_error(pDevice, "[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed.", MAL_FAILED_TO_CONFIGURE_BACKEND_DEVICE);
}
}
}
}
if (((mal_snd_pcm_sw_params_proc)pContext->alsa.snd_pcm_sw_params)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams) != 0) {
if (((mal_snd_pcm_sw_params_proc)pContext->alsa.snd_pcm_sw_params)((mal_snd_pcm_t*)pDevice->alsa.pPCM, pSWParams) != 0) {
mal_device_uninit__alsa(pDevice);
mal_device_uninit__alsa(pDevice);
returnmal_post_error(pDevice,"[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed.",MAL_ALSA_FAILED_TO_SET_SW_PARAMS);
return mal_post_error(pDevice, "[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed.", MAL_FAILED_TO_CONFIGURE_BACKEND_DEVICE);