diff options
Diffstat (limited to 'scene/audio/audio_stream_player.h')
-rw-r--r-- | scene/audio/audio_stream_player.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h index 9dbdccdc69..754e670553 100644 --- a/scene/audio/audio_stream_player.h +++ b/scene/audio/audio_stream_player.h @@ -31,10 +31,12 @@ #ifndef AUDIO_STREAM_PLAYER_H #define AUDIO_STREAM_PLAYER_H -#include "core/templates/safe_refcount.h" #include "scene/main/node.h" -#include "scene/scene_string_names.h" -#include "servers/audio/audio_stream.h" + +struct AudioFrame; +class AudioStream; +class AudioStreamPlayback; +class AudioStreamPlayerInternal; class AudioStreamPlayer : public Node { GDCLASS(AudioStreamPlayer, Node); @@ -47,25 +49,13 @@ public: }; private: - Vector<Ref<AudioStreamPlayback>> stream_playbacks; - Ref<AudioStream> stream; - - SafeFlag active; - - float pitch_scale = 1.0; - float volume_db = 0.0; - bool autoplay = false; - StringName bus = SceneStringNames::get_singleton()->Master; - int max_polyphony = 1; + AudioStreamPlayerInternal *internal = nullptr; MixTarget mix_target = MIX_TARGET_STEREO; void _set_playing(bool p_enable); bool _is_active() const; - void _on_bus_layout_changed(); - void _on_bus_renamed(int p_bus_index, const StringName &p_old_name, const StringName &p_new_name); - Vector<AudioFrame> _get_volume_vector(); protected: @@ -73,6 +63,10 @@ protected: void _notification(int p_what); static void _bind_methods(); + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; + public: void set_stream(Ref<AudioStream> p_stream); Ref<AudioStream> get_stream() const; |