returnmal_post_error(pDevice,"[ALSA] Failed to set access mode to SND_PCM_ACCESS_RW_INTERLEAVED. snd_pcm_hw_params_set_access() failed.",MAL_FORMAT_NOT_SUPPORTED);
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);
if(channels==0||sampleRate==0||fragmentSizeInFrames==0||fragmentCount==0)returnmal_post_error(pDevice,"mal_device_init() called with invalid arguments.",MAL_INVALID_ARGS);
if(pDevice==NULL)returnmal_post_error(pDevice,"mal_device_start() called with invalid arguments.",MAL_INVALID_ARGS);
if(mal_device__get_state(pDevice)==MAL_STATE_UNINITIALIZED)returnmal_post_error(pDevice,"mal_device_start() called for an uninitialized device.",MAL_DEVICE_NOT_INITIALIZED);
// Be a bit more descriptive if the device is already started or is already in the process of starting. This is likely
if(pDevice==NULL)returnmal_post_error(pDevice,"mal_device_stop() called with invalid arguments.",MAL_INVALID_ARGS);
if(mal_device__get_state(pDevice)==MAL_STATE_UNINITIALIZED)returnmal_post_error(pDevice,"mal_device_stop() called for an uninitialized device.",MAL_DEVICE_NOT_INITIALIZED);
// Be a bit more descriptive if the device is already stopped or is already in the process of stopping. This is likely