audio.h (827B)
1 /* 2 Copyright (c) 2021 Devine Lu Linvega, Andrew Alderwick 3 4 Permission to use, copy, modify, and distribute this software for any 5 purpose with or without fee is hereby granted, provided that the above 6 copyright notice and this permission notice appear in all copies. 7 8 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 WITH REGARD TO THIS SOFTWARE. 10 */ 11 12 typedef signed int Sint32; 13 14 #define AUDIO_BUFSIZE 256.0f 15 #define SAMPLE_FREQUENCY 44100.0f 16 #define POLYPHONY 4 17 18 Uint8 audio_get_vu(int instance); 19 Uint16 audio_get_position(int instance); 20 int audio_render(int instance, Sint16 *sample, Sint16 *end); 21 void audio_start(int instance, Uint8 *d, Uxn *u); 22 void audio_finished_handler(int instance); 23 void audio_handler(void *ctx, Uint8 *out_stream, int len); 24 Uint8 audio_dei(int instance, Uint8 *d, Uint8 port);