I’m trying to play a music from the middle of the song,and i want to loop the music from certain sample or seconds.
Say the music is 60 seconds long.i want to play with it from 30 sec to 40 sec and loop it.
how can i do that?
i search the document,found some function called SetPositionAttr(int value)
guess this is the audio offset play function,but is it not working.
i use the 14_soundeffect example
and add some code like this
musicSource->SetPositionAttr(44100 * 5); musicSource->Play(music);
nothing is happening
then i thought maybe it will work after the play function call.
not sure what’s going on here.
what’s correct way to use this SetPositionAttr function?