Skip to content
Discussion options

You must be logged in to vote

You have several things wrong here.

First, the device config is only used for configuring a ma_device object. The way you're using it here is not working the way you're expecting. The format, channels and rate in the waveform config is being set to 0. Change this to ma_format_f32, 1 and 48000 as a starting point and then modify from there to suit your requirements.

The other thing is that I can see you are declaring your objects as local variables. When the function returns they'll go out of scope and will become invalid. You need to make sure they stay valid for their entire lifetime. Put it side-by-side with your loadedAudio object.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Platforming-Mayhem
Comment options

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