YZ_functions.h 861 B

123456789101112131415161718192021
  1. #ifndef YZ_FUNCTIONS_H
  2. #define YZ_FUNCTIONS_H
  3. #include "YZ_types.h"
  4. // loads an audio file into a playable format
  5. YZ_audio_stream* YZ_load_audio_file(char* filename, unsigned char debug_mode);
  6. // play an audio stream one time though
  7. pa_callback_data* YZ_play_stream(YZ_audio_stream* audio_stream);
  8. // play an audio stream with optional effects. You can change speed, turn on looping, or set the starting second of the stream.
  9. pa_callback_data* YZ_play_stream_dynamic(YZ_audio_stream* audio_stream, double* speed_multiplier, unsigned char* should_loop_audio, double start_second, void (*end_function)(void*), void* custom_pointer_for_end_function);
  10. // Initializes the audio player. Playing a stream when the player is uninitializes automatically runs this function.
  11. void YZ_init_player();
  12. // Kills the player and frees memory
  13. void YZ_kill_player();
  14. #endif