Mercurial > hg > sv-dependency-builds
diff src/libsamplerate-0.1.9/examples/audio_out.h @ 41:481f5f8c5634
Current libsamplerate source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:24:45 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libsamplerate-0.1.9/examples/audio_out.h Tue Oct 18 13:24:45 2016 +0100 @@ -0,0 +1,25 @@ +/* +** Copyright (c) 1999-2016, Erik de Castro Lopo <erikd@mega-nerd.com> +** All rights reserved. +** +** This code is released under 2-clause BSD license. Please see the +** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING +*/ + +typedef struct AUDIO_OUT_s AUDIO_OUT ; + +typedef int (*get_audio_callback_t) (void *callback_data, float *samples, int frames) ; + +/* A general audio output function (Linux/ALSA, Linux/OSS, Win32, MacOSX, +** Solaris) which retrieves data using the callback function in the above +** struct. +** +** audio_open - opens the device and returns an anonymous pointer to its +** own private data. +*/ + +AUDIO_OUT *audio_open (int channels, int samplerate) ; + +void audio_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void *callback_data) ; + +void audio_close (AUDIO_OUT *audio_data) ;