VERSIÓ 1.5.9:
- [NEW] Audio passat al backend SDL3. Los últimos vestigios del antiguo jail_audio han sido barridos.
This commit is contained in:
@@ -33,13 +33,6 @@ namespace backend
|
||||
void cursor(const bool value);
|
||||
}
|
||||
|
||||
namespace audio
|
||||
{
|
||||
void init();
|
||||
void quit();
|
||||
void render();
|
||||
}
|
||||
|
||||
namespace input
|
||||
{
|
||||
void reset();
|
||||
@@ -74,4 +67,53 @@ namespace backend
|
||||
int press();
|
||||
}
|
||||
}
|
||||
|
||||
namespace audio
|
||||
{
|
||||
void init();
|
||||
void quit();
|
||||
|
||||
namespace music
|
||||
{
|
||||
enum state { invalid, playing, paused, stopped, disabled };
|
||||
|
||||
int load(const char* filename);
|
||||
int load(const uint8_t* buffer, uint32_t length);
|
||||
void play(int mus, int loop = -1);
|
||||
void pause();
|
||||
void resume();
|
||||
void stop();
|
||||
void fadeOut(int milliseconds);
|
||||
state getState();
|
||||
void destroy(int mus);
|
||||
float setVolume(float vol);
|
||||
void setPosition(float value);
|
||||
float getPosition();
|
||||
void enable(bool value);
|
||||
bool isEnabled();
|
||||
}
|
||||
|
||||
namespace sound
|
||||
{
|
||||
int create(uint8_t* buffer, uint32_t length);
|
||||
int load(uint8_t* buffer, uint32_t length);
|
||||
int load(const char* filename);
|
||||
int play(int snd, int loop = 0);
|
||||
int playOnChannel(int snd, int chan, int loop = 0);
|
||||
void destroy(int snd);
|
||||
float setVolume(float vol);
|
||||
void enable(bool value);
|
||||
bool isEnabled();
|
||||
|
||||
namespace channel
|
||||
{
|
||||
enum state { invalid, free, playing, paused, disabled };
|
||||
void pause(int chan);
|
||||
void resume(int chan);
|
||||
void stop(int chan);
|
||||
state getState(int chan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user