Implemented load audio and music files as well the basic audio playback
functionality.
This commit is contained in:
1 parent
dfee36ffe9
commit
e3f4f9c94f
9 files changed
+464
-61
No files matched your search
+33
-2
@@ -6,19 +6,50 @@
|
||||
#include "SDL_pixels.h"
|
||||
#include "reusable_ids.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // !__cplusplus
|
||||
|
||||
bool init_game(const char *game_name, int window_width, int window_height,
|
||||
SDL_Color window_background_color, bool full_screen);
|
||||
bool init_game(const char *game_name, uint32_t window_width,
|
||||
uint32_t window_height, SDL_Color window_background_color,
|
||||
bool full_screen, uint8_t audio_tracks);
|
||||
bool game_running();
|
||||
ObjectID add_object(void *object, EventHandlerPtr eh, UpdateFuncPtr uf,
|
||||
RenderFuncPtr rf);
|
||||
void remove_object(ObjectID *id);
|
||||
AssetID load_asset(const char *path, AssetType type);
|
||||
void render_texture_asset(AssetID id, float x, float y, float w, float h);
|
||||
int8_t play_audio_asset(AssetID id, int16_t loops, bool fade_in,
|
||||
uint32_t fade_length_in_ms);
|
||||
void pause_audio_asset_on_track(AssetID id, uint8_t track);
|
||||
void resume_audio_asset_on_track(AssetID id, uint8_t track);
|
||||
void stop_audio_asset_on_track(AssetID id, uint8_t track);
|
||||
void fade_out_audio_asset_on_track(AssetID id, uint8_t track,
|
||||
uint32_t fade_length_in_ms);
|
||||
void pause_all_instances_of_audio_asset(AssetID id);
|
||||
void resume_all_instances_of_audio_asset(AssetID id);
|
||||
void stop_all_instances_of_audio_asset(AssetID id);
|
||||
void fade_out_all_instances_of_audio_asset(AssetID id,
|
||||
uint32_t fade_length_in_ms);
|
||||
int8_t get_audio_asset_volume(AssetID id);
|
||||
void set_audio_asset_volume(AssetID id, int8_t volume);
|
||||
void play_music_asset(AssetID id, int16_t loops, bool fade_in,
|
||||
uint32_t fade_length_in_ms);
|
||||
void pause_music_asset(AssetID id);
|
||||
void resume_music_asset(AssetID id);
|
||||
void stop_music_asset(AssetID id);
|
||||
void fade_out_music_asset(AssetID id, uint32_t fade_length_in_ms);
|
||||
int8_t get_music_asset_volume(AssetID id);
|
||||
void set_music_asset_volume(AssetID id, int8_t volume);
|
||||
bool is_music_asset_playing(AssetID id);
|
||||
void pause_playing_music();
|
||||
void resume_playing_music();
|
||||
void stop_playing_music();
|
||||
void fade_out_playing_music(uint32_t fade_length_in_ms);
|
||||
void set_playing_music_volume(int8_t volume);
|
||||
bool is_music_playing();
|
||||
void close_asset(AssetID *id);
|
||||
void handle_events();
|
||||
void update();
|
||||
|
||||
Reference in new issue
Block a user