Merge pull request #53641 from DeeJayLSP/audio_pitch_fix
This commit is contained in:
commit
b47580a7a4
5 changed files with 8 additions and 8 deletions
|
|
@ -1112,16 +1112,16 @@ float AudioServer::get_playback_speed_scale() const {
|
|||
return playback_speed_scale;
|
||||
}
|
||||
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time) {
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time, float p_pitch_scale) {
|
||||
ERR_FAIL_COND(p_playback.is_null());
|
||||
|
||||
Map<StringName, Vector<AudioFrame>> map;
|
||||
map[p_bus] = p_volume_db_vector;
|
||||
|
||||
start_playback_stream(p_playback, map, p_start_time);
|
||||
start_playback_stream(p_playback, map, p_start_time, p_pitch_scale);
|
||||
}
|
||||
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_highshelf_gain, float p_attenuation_cutoff_hz, float p_pitch_scale) {
|
||||
void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_pitch_scale, float p_highshelf_gain, float p_attenuation_cutoff_hz) {
|
||||
ERR_FAIL_COND(p_playback.is_null());
|
||||
|
||||
AudioStreamPlaybackListNode *playback_node = new AudioStreamPlaybackListNode();
|
||||
|
|
|
|||
|
|
@ -368,9 +368,9 @@ public:
|
|||
float get_playback_speed_scale() const;
|
||||
|
||||
// Convenience method.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0);
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0, float p_pitch_scale = 1);
|
||||
// Expose all parameters.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0, float p_pitch_scale = 1);
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<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);
|
||||
void stop_playback_stream(Ref<AudioStreamPlayback> p_playback);
|
||||
|
||||
void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue