Main Page   Data Structures   File List   Data Fields   Globals  

include/fluidsynth/audio.h File Reference

Functions for audio driver output. More...

Go to the source code of this file.

Typedefs

typedef int(* fluid_audio_func_t )(void *data, int len, int nin, float **in, int nout, float **out)
 Callback function type used with new_fluid_audio_driver2() to allow for custom user audio processing before the audio is sent to the driver. More...


Functions

FLUIDSYNTH_API fluid_audio_driver_t * new_fluid_audio_driver (fluid_settings_t *settings, fluid_synth_t *synth)
 Create a new audio driver. More...

FLUIDSYNTH_API fluid_audio_driver_t * new_fluid_audio_driver2 (fluid_settings_t *settings, fluid_audio_func_t func, void *data)
 Create a new audio driver. More...

FLUIDSYNTH_API void delete_fluid_audio_driver (fluid_audio_driver_t *driver)
 Deletes an audio driver instance. More...


Detailed Description

Functions for audio driver output.

Defines functions for creating audio driver output. Use new_fluid_audio_driver() to create a new audio driver for a given synth and configuration settings. The function new_fluid_audio_driver2() can be used if custom audio processing is desired before the audio is sent to the audio driver (although it is not as efficient).

Definition in file audio.h.


Typedef Documentation

typedef int(* fluid_audio_func_t)(void* data, int len, int nin, float** in, int nout, float** out)
 

Callback function type used with new_fluid_audio_driver2() to allow for custom user audio processing before the audio is sent to the driver.

This function is responsible for rendering the audio to the buffers.

Parameters:
data  The user data parameter as passed to new_fluid_audio_driver2().
len  Length of the audio in frames.
nin  Count of buffers in 'in'
in  FIXME - Not used currently?
nout  Count of arrays in 'out' (i.e., channel count)
out  Output buffers, one for each channel
Returns:
Should return 0 on success, non-zero if an error occured.

Definition at line 51 of file audio.h.


Function Documentation

FLUIDSYNTH_API fluid_audio_driver_t* new_fluid_audio_driver fluid_settings_t *    settings,
fluid_synth_t *    synth
 

Create a new audio driver.

Parameters:
settings  Configuration settings used to select and create the audio driver.
synth  Synthesizer instance for which the audio driver is created for.
Returns:
The new audio driver instance.
Creates a new audio driver for a given 'synth' instance with a defined set of configuration 'settings'.

Definition at line 278 of file fluid_adriver.c.

FLUIDSYNTH_API fluid_audio_driver_t* new_fluid_audio_driver2 fluid_settings_t *    settings,
fluid_audio_func_t    func,
void *    data
 

Create a new audio driver.

Parameters:
settings  Configuration settings used to select and create the audio driver.
func  Function called to fill audio buffers for audio playback
data  User defined data pointer to pass to 'func'
Returns:
The new audio driver instance.
Like new_fluid_audio_driver() but allows for custom audio processing before audio is sent to audio driver. It is the responsibility of the callback 'func' to render the audio into the buffers. NOTE: Not as efficient as new_fluid_audio_driver().

Definition at line 315 of file fluid_adriver.c.

FLUIDSYNTH_API void delete_fluid_audio_driver fluid_audio_driver_t *    driver
 

Deletes an audio driver instance.

Parameters:
driver  Audio driver instance to delete
Shuts down an audio driver and deletes its instance.

Definition at line 346 of file fluid_adriver.c.


Generated on Tue Aug 26 12:20:27 2008 for libfluidsynth by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001