/* initialize and configures all required resources for audio play function  */
static uint8_t init(uint32_t audio_freq, uint32_t volume, uint32_t options)
/* initialize and configures all required resources for audio play function  */
static uint8_t init(uint32_t audio_freq, uint32_t volume, uint32_t options)
{
    static uint32_t initialized = 0U;
    if (0U == initialized) {
        if (0U != eval_audio_init(OUTPUT_DEVICE_AUTO, (uint8_t)volume, audio_freq)) {
            audio_state = AUDIO_STATE_ERROR;
            return AUDIO_FAIL;
        }
        initialized = 1U;
    }
    audio_state = AUDIO_STATE_ACTIVE;
    return AUDIO_OK;
}