#ifndef _UBOX_SOUND_H #define _UBOX_SOUND_H #ifndef UBOX_SOUND_DIVIDER /* ubox_sound_update will be called from the timer int, so we update every * 1080ms approx by using a counter and updating 1 in 20 interrupts */ #define UBOX_SOUND_DIVIDER 20 #endif typedef struct { const char *data; size_t len; } ubox_sound_data; /* mus is expected to be a IT module, efx are samples */ uint8_t ubox_sound_init(const ubox_sound_data *mus, const ubox_sound_data *efx, uint8_t efx_cnt); void ubox_sound_free(); void ubox_sound_update(); void ubox_sound_music_pattern(uint16_t pat); /* priority based efx player using order: * The effects plays if nothing is playing or if the effect playing has equal * or less priority. */ void ubox_sound_play_efx(uint8_t efxno); void ubox_sound_mute(); void ubox_sound_unmute(); #endif /* _UBOX_SOUND_H */