29 #ifndef SPATIAL_STREAM_PLAYER_H 30 #define SPATIAL_STREAM_PLAYER_H 32 #include "scene/resources/audio_stream.h" 33 #include "scene/3d/spatial_player.h" 34 #include "servers/audio/audio_rb_resampler.h" 42 struct InternalStream :
public AudioServer::AudioStream {
44 virtual int get_channel_count()
const;
45 virtual void set_mix_rate(
int p_rate);
46 virtual bool mix(int32_t *p_buffer,
int p_frames);
47 virtual void update();
51 InternalStream internal_stream;
55 int sp_get_channel_count()
const;
56 void sp_set_mix_rate(
int p_rate);
57 bool sp_mix(int32_t *p_buffer,
int p_frames);
70 AudioRBResampler resampler;
73 void _set_play(
bool p_play);
74 bool _get_play()
const;
76 void _notification(
int p_what);
78 static void _bind_methods();
84 void play(
float p_from_offset=0);
86 bool is_playing()
const;
88 void set_paused(
bool p_paused);
89 bool is_paused()
const;
91 void set_loop(
bool p_enable);
92 bool has_loop()
const;
94 void set_volume(
float p_vol);
95 float get_volume()
const;
97 void set_loop_restart_time(
float p_secs);
98 float get_loop_restart_time()
const;
100 void set_volume_db(
float p_db);
101 float get_volume_db()
const;
103 String get_stream_name()
const;
105 int get_loop_count()
const;
107 float get_pos()
const;
108 void seek_pos(
float p_time);
109 float get_length()
const;
110 void set_autoplay(
bool p_vol);
111 bool has_autoplay()
const;
113 void set_buffering_msec(
int p_msec);
114 int get_buffering_msec()
const;
120 #endif // SPATIAL_STREAM_PLAYER_H
Definition: spatial_stream_player.h:36
Definition: spatial_player.h:39