SunVox DLL: add function to inject audio into "Input" modules.
Posted: Sat Sep 24, 2016 9:24 pm
This is a proposal to add a function to the SunVox DLL to feed audio data to specific "Input" modules.
The function prototype might look like this:
Ideas for behavior:
The function prototype might look like this:
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.