Skip to content

How to play an audio in specified time bounds? #596

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

You must be logged in to vote

Try using ma_data_source_set_range_in_pcm_frames(). Get the ma_data_source object with ma_sound_get_data_source(). The range is specified in frames so you'll need to convert your seconds to frames which you can use with the sample rate which you can retrieve with ma_sound_get_data_format() (pass in NULL for the variables you don't need).

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@vkuznetsovgn
Comment options

@vkuznetsovgn
Comment options

@mackron
Comment options

@vkuznetsovgn
Comment options

@mackron
Comment options

Answer selected by vkuznetsovgn
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