tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
836 stars 42 forks source link

get length of StreamingSoundData from StreamingSoundHandle #72

Open walksanatora opened 6 months ago

walksanatora commented 6 months ago

it would be a nice feature if we could query the total length of the audio in a StreamingSound(Data/Handle) I tried to look into making a MediaSource and piping interleaved PCM into it but... I dont know if that would work.

tesselode commented 6 months ago

I just merged in a PR that implements this.

tesselode commented 5 months ago

I think I misread this issue when I first looked at it. @walksanatora do you specifically need to be able to get the duration from a StreamingSoundHandle? Or would querying the StreamingSoundData suffice?

walksanatora commented 5 months ago

I think either or would work. It was just with Sound Data it would have me add another value to my global state struct