summaryrefslogtreecommitdiff
path: root/scene/audio/audio_stream_player.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-08 09:31:08 +0100
committerGitHub <noreply@github.com>2021-02-08 09:31:08 +0100
commitcea42faa77d72cdbea8ab7c38936e7c8722900d0 (patch)
tree3c7f54d3b3e6d355a2ffb14933e0b5461478b224 /scene/audio/audio_stream_player.h
parent57e2822a05c29db3980ad243c37a34acf6c4d14b (diff)
parent003bb8e1a8c9bb81e3cb0733b3f0d569b1518881 (diff)
Merge pull request #44630 from qarmin/cppcheck_scene_1
Initialize class variables with default values in scene/ [1/2]
Diffstat (limited to 'scene/audio/audio_stream_player.h')
-rw-r--r--scene/audio/audio_stream_player.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h
index fa45a39682..ab98d41302 100644
--- a/scene/audio/audio_stream_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -49,22 +49,22 @@ private:
Ref<AudioStream> stream;
Vector<AudioFrame> mix_buffer;
Vector<AudioFrame> fadeout_buffer;
- bool use_fadeout;
-
- volatile float setseek;
- volatile bool active;
- volatile bool setstop;
- volatile bool stop_has_priority;
-
- float mix_volume_db;
- float pitch_scale;
- float volume_db;
- bool autoplay;
- bool stream_paused;
- bool stream_paused_fade;
+ bool use_fadeout = false;
+
+ volatile float setseek = -1.0;
+ volatile bool active = false;
+ volatile bool setstop = false;
+ volatile bool stop_has_priority = false;
+
+ float mix_volume_db = 0.0;
+ float pitch_scale = 1.0;
+ float volume_db = 0.0;
+ bool autoplay = false;
+ bool stream_paused = false;
+ bool stream_paused_fade = false;
StringName bus;
- MixTarget mix_target;
+ MixTarget mix_target = MIX_TARGET_STEREO;
void _mix_internal(bool p_fadeout);
void _mix_audio();