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:
Code: Select all
int sv_audio_input( int slot, int mod_num, void* buf, int frames ) SUNVOX_FN_ATTR;
Ideas for behavior:
- 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.
One use case I'm thinking of is a SunVox-specific DJ/performance mixing system, where there there are 4+ processes each managing their own SunVox DLL instance. 2+ of them would be playing back SunVox files into small buffers. The contents of those buffers would be piped into corresponding "Input" modules of two other processes (one for master, one for headphones), using a project set up for channel EQ, filtering, mixdown, etc. (The UI would then take MIDI messages from a DJ controller and map them to commands sent to each SunVox process)