uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

audio.h (852B)


      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_VERSION 1
     15 
     16 #define AUDIO_BUFSIZE 256.0f
     17 #define SAMPLE_FREQUENCY 44100.0f
     18 #define POLYPHONY 4
     19 
     20 Uint8 audio_get_vu(int instance);
     21 Uint16 audio_get_position(int instance);
     22 int audio_render(int instance, Sint16 *sample, Sint16 *end);
     23 void audio_start(int instance, Uint8 *d, Uxn *u);
     24 void audio_finished_handler(int instance);
     25 void audio_handler(void *ctx, Uint8 *out_stream, int len);
     26 Uint8 audio_dei(int instance, Uint8 *d, Uint8 port);