z_mirror/sdl-osu
git clone https://git.raiguard.me/z_mirror/sdl-osu
836a89c
trunk
1#pragma once 2#include <SDL3/SDL_audio.h> 3#include <SDL3/SDL_stdinc.h> 4#include <stdbool.h> 5 6struct Osu_HitObject ; 7 8struct Osu_PlayingSound { 9SDL_AudioStream * stream ; 10struct Osu_PlayingSound * next ; 11}; 12 13struct Osu_Audio { 14struct MIX_Mixer * mixer ; 15 16SDL_PropertiesID musicProps ; 17struct MIX_Track * musicTrack ; 18struct MIX_Audio * music ; 19char * musicPath ; 20 21struct MIX_Audio * hitNormal ; 22struct MIX_Audio * hitWhistle ; 23struct MIX_Audio * hitFinish ; 24struct MIX_Audio * hitClap ; 25}; 26 27struct Osu_Audio * Osu_CreateAudio (const char * dataPath ); 28void Osu_DestroyAudio (struct Osu_Audio * ); 29 30void Osu_SetMusic (struct Osu_Audio * audio ,const char * path ,Sint32 position ,bool repeat ); 31void Osu_PlayMusic (struct Osu_Audio * audio ); 32void Osu_PlayHitSounds (struct Osu_Audio * audio ,struct Osu_HitObject * hitObject );