#pragma once

#include "base/base_core.h"

struct AudioEngine;

struct AudioDeviceInfo {
    char    name[128];
    S32 id;         // index into engine's device list
};

AudioEngine    *audio_create(void *hwnd);
void            audio_destroy(AudioEngine *engine);
void            audio_refresh_devices(AudioEngine *engine);
S32         audio_get_device_count(AudioEngine *engine);
AudioDeviceInfo*audio_get_device(AudioEngine *engine, S32 index);

B32            audio_open_device(AudioEngine *engine, S32 index);
void            audio_close_device(AudioEngine *engine);

void            audio_play_test_tone(AudioEngine *engine);
B32            audio_is_test_tone_playing(AudioEngine *engine);
void            audio_update(AudioEngine *engine, F32 dt);
