// // Created by xemon on 17.11.22. // #include #include "AudioPlayerInterface.h" bool AudioPlayerInterfacePlay(tAudioPlayerInterface *env, char *sampleName, uint16_t snLength, uint32_t timeout) { uint32_t end = SystemGetMs() + timeout; while (end > SystemGetMs()){ if (AudioPlayer_Start(env, sampleName, snLength, timeout)) { return true; } SystemDelayMs(500); } SystemDelayMs(500); return false; } bool AudioPlayerInterfacePlayTone(tAudioPlayerInterface *env, uint16_t count) { if (AudioPlayer_PlayTone(env, count)) { return true; } SystemDelayMs(500); return false; } bool AudioPlayerInterfacePlayToEnd(tAudioPlayerInterface *env, char *sampleName, uint16_t snLength, uint32_t timeout) { if (AudioPlayer_StartToEnd(env, sampleName, snLength, timeout)) { return true; } SystemDelayMs(500); return false; }