The function prototype might look like this:
Ideas for behavior:
Code: Select all
int sv_audio_input( int slot, int mod_num, void* buf, int frames ) SUNVOX_FN_ATTR;
- After a buffer is set, the next sv_audio_callback would cause that Input module to read from the beginning of that buffer as it produces its output.
- If an Input module reaches the end of a buffer, it will produce no output.
- It is therefore up to the caller to manage the synchronization of buffer sizes and timing.
- It might be useful somehow during realtime playback if there a way to register a callback, but the intent is for this to be useful only when SV_INIT_FLAG_USER_AUDIO_CALLBACK is set during initialization.