diff options
author | Adam Scott <ascott.ca@gmail.com> | 2024-04-18 10:50:34 -0400 |
---|---|---|
committer | Adam Scott <ascott.ca@gmail.com> | 2024-06-18 11:06:31 -0400 |
commit | 52fa4f05f3945fdf511c249adede9b6d07c51beb (patch) | |
tree | 2ac2aca86c09dd757fd4a8b5defab932f2b8eb5d /scene/2d/audio_stream_player_2d.h | |
parent | eb20a68b323c1fcb75492f8132e1bd6d321713ec (diff) | |
download | redot-engine-52fa4f05f3945fdf511c249adede9b6d07c51beb.tar.gz |
Add samples playback support
Diffstat (limited to 'scene/2d/audio_stream_player_2d.h')
-rw-r--r-- | scene/2d/audio_stream_player_2d.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h index 3a3e6510c8..309e206fe4 100644 --- a/scene/2d/audio_stream_player_2d.h +++ b/scene/2d/audio_stream_player_2d.h @@ -32,6 +32,7 @@ #define AUDIO_STREAM_PLAYER_2D_H #include "scene/2d/node_2d.h" +#include "servers/audio_server.h" struct AudioFrame; class AudioStream; @@ -64,6 +65,8 @@ private: uint64_t last_mix_count = -1; bool force_update_panning = false; + AudioServer::PlaybackType playback_type = AudioServer::PlaybackType::PLAYBACK_TYPE_DEFAULT; + void _set_playing(bool p_enable); bool _is_active() const; @@ -137,6 +140,9 @@ public: bool has_stream_playback(); Ref<AudioStreamPlayback> get_stream_playback(); + AudioServer::PlaybackType get_playback_type() const; + void set_playback_type(AudioServer::PlaybackType p_playback_type); + AudioStreamPlayer2D(); ~AudioStreamPlayer2D(); }; |