Document retro.h too

This commit is contained in:
twinaphex 2015-01-08 18:42:27 +01:00
parent 362077c9f9
commit 1194b2c6fd
2 changed files with 45 additions and 1 deletions

View File

@ -245,6 +245,17 @@ static bool audio_flush(const int16_t *data, size_t samples)
#define write_audio(data, samples) (driver.audio_active = audio_flush((data), (samples)) && driver.audio_active)
/**
* retro_flush_audio:
* @data : pointer to audio buffer.
* @samples : amount of samples to write.
*
* Writes audio samples to audio driver. Will first
* perform DSP processing (if enabled) and resampling.
*
* driver.audio_active will be set to false (0) in case
* of an error, otherwise will be set to true (1).
**/
void retro_flush_audio(const int16_t *data, size_t samples)
{
write_audio(data, samples);
@ -622,7 +633,7 @@ void retro_set_default_callbacks(void *data)
}
/**
* retro_set_default_callbacks:
* retro_init_libretro_cbs:
* @data : pointer to retro_callbacks object
*
* Initializes libretro callbacks, and binds the libretro callbacks

33
retro.h
View File

@ -33,9 +33,42 @@ typedef struct retro_callbacks
retro_input_poll_t poll_cb;
} retro_callbacks_t;
/**
* retro_init_libretro_cbs:
* @data : pointer to retro_callbacks object
*
* Initializes libretro callbacks, and binds the libretro callbacks
* to default callback functions.
**/
void retro_init_libretro_cbs(void *data);
/**
* retro_set_default_callbacks:
* @data : pointer to retro_callbacks object
*
* Binds the libretro callbacks to default callback functions.
**/
void retro_set_default_callbacks(void *data);
/**
* retro_set_rewind_callbacks:
*
* Sets the audio sampling callbacks based on whether or not
* rewinding is currently activated.
**/
void retro_set_rewind_callbacks(void);
/**
* retro_flush_audio:
* @data : pointer to audio buffer.
* @samples : amount of samples to write.
*
* Writes audio samples to audio driver. Will first
* perform DSP processing (if enabled) and resampling.
*
* driver.audio_active will be set to false (0) in case
* of an error, otherwise will be set to true (1).
**/
void retro_flush_audio(const int16_t *data, size_t samples);
#ifdef __cplusplus