summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-11 09:22:49 +0200
committerGitHub <noreply@github.com>2021-10-11 09:22:49 +0200
commitb47580a7a496ea5cf92e85598be88df834e94410 (patch)
tree5d32310819fb66053c621d7971bf3902690c28bc /servers
parent498602009be0e1becd29ad9a3305120489b8c7b6 (diff)
parent39a90751dc342c81e76a1c443e2e1eb83cf329f8 (diff)
Merge pull request #53641 from DeeJayLSP/audio_pitch_fix
Diffstat (limited to 'servers')
-rw-r--r--servers/audio_server.cpp6
-rw-r--r--servers/audio_server.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index ac1569c15d..a420134626 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -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();
diff --git a/servers/audio_server.h b/servers/audio_server.h
index a60d4ae4c4..46873845dc 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -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);