#ifndef GAME_AUDIO_H
#define GAME_AUDIO_H

#include <maxmod9.h>

struct AudioContext {
    bool musicEnabled = true;

    mm_sound_effect sfx_pickup;
    mm_sound_effect sfx_boom;
    mm_sound_effect sfx_pause;
    mm_sound_effect sfx_unpause;
    mm_sound_effect sfx_plop;
    mm_sound_effect sfx_fail;
};

void audio_setup(AudioContext &audio);
void audio_start_music(const AudioContext &audio);
void audio_stop_music();
void audio_pause_music_if_enabled(const AudioContext &audio);
void audio_resume_music_if_enabled(const AudioContext &audio);

void audio_play_pickup(const AudioContext &audio);
void audio_play_boom(const AudioContext &audio);
void audio_play_plop(const AudioContext &audio);
void audio_play_pause(const AudioContext &audio);
void audio_play_unpause(const AudioContext &audio);
void audio_play_fail(const AudioContext &audio);

bool audio_toggle_music(AudioContext &audio);
bool audio_is_music_enabled(const AudioContext &audio);

#endif
