How to get sample position in bytes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 9BitStrider

I’m wanting to loop an audio sample from a certain point in the sample itself. Loop Begin and End is asking for the position in bytes, but I’m not entirely sure how to get said information.

:bust_in_silhouette: Reply From: uriel

hi, you have to get the buffer from audiostreamplayback or similar, check the doc to get the proper method.

i am using the other option to get the length of the sample in seconds, and then i can use other methods to know the actual position or its start/end, using seconds all way long.