Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Expose spl_read from audio addon. #1046
Internally this function is used to read data from an audio source into a destination buffer:
/* Read some samples into a mixer buffer. * * source: * The object to read samples from. This may be one of several types. * * *vbuf: (in-out parameter) * Pointer to pointer to destination buffer. * (should confirm what it means to change the pointer on return) * * *samples: (in-out parameter) * On input indicates the maximum number of samples that can fit into *vbuf. * On output indicates the actual number of samples that were read. * * buffer_depth: * The audio depth of the destination buffer. * * dest_maxc: * The number of channels in the destination. */ (*stream_reader_t)(void *source, void **vbuf, unsigned int *samples, ALLEGRO_AUDIO_DEPTH buffer_depth, size_t dest_maxc);
If we exposed it, it'd let people use Allegro's audio loading routines etc, but render the audio to an output other than a voice.