Skip to content

Conversation

@Dajamante
Copy link
Contributor

@Dajamante Dajamante commented Nov 20, 2021

Hello Nathan,
I tested volume for sfx in the road_race example (all other examples would need to be updated at some point).
I am not sure how to proceed from here.

First and foremost, shall the sfx_queue take a Vec<Option<(sfx,vol)>> .. or Vec<(sfx,vol)>?

#[derive(Debug, Default)]
pub struct AudioManager {
    sfx_queue: Vec<(SfxPreset, f32)>,
    music_queue: Vec<Option<(MusicPreset, f32)>>,
    playing: AudioChannel,
}

Then, I wish to make both sfx_queue and music_queue as generic to play them in fn queue_managed_audio_system() but is it the right way to go?

@CleanCut
Copy link
Owner

That's very close! If you will enable the option for me to push commits to your fork, I will push up some improvements that we can take a look at. The biggest problem in the current form is that we can lose access to the music channel, which means we will not be able to stop the music.

@Dajamante
Copy link
Contributor Author

I checked "Allow edits by maintainers" and added you as collaborator :)

@Dajamante
Copy link
Contributor Author

Thank you!
Are there other examples left to be updated? What shall we do next?

@CleanCut CleanCut mentioned this pull request Nov 29, 2021
9 tasks
@CleanCut
Copy link
Owner

@Dajamante I take it you approve of the changes I made. 😉 I don't think there is anything left to do for soundfx volume in this pull request, so I'll go ahead and merge it!

I listed out other stuff I'd like done for Rusty Engine 3.0 and beyond in #16, if you're interested!

@CleanCut CleanCut merged commit 8969811 into CleanCut:main Nov 29, 2021
CleanCut added a commit that referenced this pull request Nov 29, 2021
@CleanCut CleanCut deleted the sfx branch December 2, 2021 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants