Skip to content

Play from memory buffer using high level API #426

Answered by mackron
oakes asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, this is possible. A ma_decoder is a data source, so you can just plug it straight into ma_sound_init_from_data_source().

ma_decoder decoder;
ma_decoder_init_memory(..., &decoder);

...

ma_sound_init_from_data_source(pEngine, &decoder, ...);

Only problem is you'll need to maintain a separate ma_decoder object along with your ma_sound object.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mackron
Comment options

@SelfishOlex
Comment options

@mackron
Comment options

@SelfishOlex
Comment options

@SelfishOlex
Comment options

Answer selected by oakes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants