Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose spl_read from audio addon. #1046

SiegeLord opened this issue May 2, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 2, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.