29 #ifndef STREAM_PLAYER_H 30 #define STREAM_PLAYER_H 32 #include "scene/resources/audio_stream.h" 33 #include "scene/main/node.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);
69 volatile bool stop_request;
72 AudioRBResampler resampler;
75 void _set_play(
bool p_play);
76 bool _get_play()
const;
78 void _notification(
int p_what);
80 static void _bind_methods();
86 void play(
float p_from_offset=0);
88 bool is_playing()
const;
90 void set_paused(
bool p_paused);
91 bool is_paused()
const;
93 void set_loop(
bool p_enable);
94 bool has_loop()
const;
96 void set_volume(
float p_vol);
97 float get_volume()
const;
99 void set_loop_restart_time(
float p_secs);
100 float get_loop_restart_time()
const;
102 void set_volume_db(
float p_db);
103 float get_volume_db()
const;
105 String get_stream_name()
const;
107 int get_loop_count()
const;
109 float get_pos()
const;
110 void seek_pos(
float p_time);
111 float get_length()
const;
112 void set_autoplay(
bool p_vol);
113 bool has_autoplay()
const;
115 void set_buffering_msec(
int p_msec);
116 int get_buffering_msec()
const;
122 #endif // AUDIO_STREAM_PLAYER_H
Definition: stream_player.h:36