One part of this is to migrate the asset loaders. The only viable option I currently see to load StaticSoundData is via from_cursor. The problem is, that I cannot satisfy the static lifetime bound for the byte slice.
One option would be to expose from_media_source. Then I can clone the bytes and pass Box::new(Cursor::new(owned_bytes)) as media source. This is the solution I am currently working with from my fork. Do you see any better approach?
I am trying to update bevy_kira_audio to Kira 0.6
One part of this is to migrate the asset loaders. The only viable option I currently see to load StaticSoundData is via
from_cursor
. The problem is, that I cannot satisfy the static lifetime bound for the byte slice.One option would be to expose
from_media_source
. Then I can clone the bytes and passBox::new(Cursor::new(owned_bytes))
as media source. This is the solution I am currently working with from my fork. Do you see any better approach?