Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AudioServer::start_playback_stream does not iterate through given bus volumes #86584

Merged

Conversation

MJacred
Copy link
Contributor

@MJacred MJacred commented Dec 28, 2023

AudioServer::set_playback_bus_volumes_linear properly loops through the given p_bus_volumes.

This fixes an inconsistency. But it does not fix any bugs, because, currently, all users (the audio players) of this func only ever send 1 bus. So actually, right now, the HashMap is unnecessary in

void start_playback_stream(Ref<AudioStreamPlayback> p_playback, HashMap<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_pitch_scale = 1, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0);

A simple StringName p_bus+Vector<AudioFrame> p_volume_db_vector combination would suffice

@MJacred MJacred requested a review from a team as a code owner December 28, 2023 17:00
@MJacred MJacred changed the title Fix AudioServer::start_playback_stream does not iterate though given p_bus_volumes Fix AudioServer::start_playback_stream does not iterate through given p_bus_volumes Dec 28, 2023
@AThousandShips AThousandShips added this to the 4.3 milestone Dec 28, 2023
@MJacred MJacred force-pushed the fix/audio_server_set_playbyck_stream branch from 56749d2 to e81887f Compare December 28, 2023 17:00
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@akien-mga akien-mga changed the title Fix AudioServer::start_playback_stream does not iterate through given p_bus_volumes Fix AudioServer::start_playback_stream does not iterate through given p_bus_volumes Jan 2, 2024
@akien-mga akien-mga added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 2, 2024
@akien-mga akien-mga merged commit ad10b07 into godotengine:master Jan 2, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@MJacred MJacred deleted the fix/audio_server_set_playbyck_stream branch February 2, 2024 09:11
@akien-mga
Copy link
Member

Cherry-picked for 4.2.2.

@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 11, 2024
@akien-mga akien-mga changed the title Fix AudioServer::start_playback_stream does not iterate through given p_bus_volumes Fix AudioServer::start_playback_stream does not iterate through given bus volumes Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants