18 lines
459 B
C
18 lines
459 B
C
//
|
|
// Created by xemon on 17.11.22.
|
|
//
|
|
#include <SystemDelayInterface.h>
|
|
#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(250);
|
|
}
|
|
return false;
|
|
}
|