summaryrefslogtreecommitdiff
path: root/scene/resources/audio_stream_sample.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/audio_stream_sample.h')
-rw-r--r--scene/resources/audio_stream_sample.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index adcac14ea8..d91cdef57d 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -36,7 +36,6 @@
class AudioStreamSample;
class AudioStreamPlaybackSample : public AudioStreamPlayback {
-
GDCLASS(AudioStreamPlaybackSample, AudioStreamPlayback);
enum {
MIX_FRAC_BITS = 13,
@@ -45,7 +44,6 @@ class AudioStreamPlaybackSample : public AudioStreamPlayback {
};
struct IMA_ADPCM_State {
-
int16_t step_index;
int32_t predictor;
/* values at loop point */
@@ -66,16 +64,16 @@ class AudioStreamPlaybackSample : public AudioStreamPlayback {
void do_resample(const Depth *p_src, AudioFrame *p_dst, int64_t &offset, int32_t &increment, uint32_t amount, IMA_ADPCM_State *ima_adpcm);
public:
- virtual void start(float p_from_pos = 0.0);
- virtual void stop();
- virtual bool is_playing() const;
+ virtual void start(float p_from_pos = 0.0) override;
+ virtual void stop() override;
+ virtual bool is_playing() const override;
- virtual int get_loop_count() const; //times it looped
+ virtual int get_loop_count() const override; //times it looped
- virtual float get_playback_position() const;
- virtual void seek(float p_time);
+ virtual float get_playback_position() const override;
+ virtual void seek(float p_time) override;
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames);
+ virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
AudioStreamPlaybackSample();
};
@@ -136,15 +134,15 @@ public:
void set_stereo(bool p_enable);
bool is_stereo() const;
- virtual float get_length() const; //if supported, otherwise return 0
+ virtual float get_length() const override; //if supported, otherwise return 0
- void set_data(const PoolVector<uint8_t> &p_data);
- PoolVector<uint8_t> get_data() const;
+ void set_data(const Vector<uint8_t> &p_data);
+ Vector<uint8_t> get_data() const;
Error save_to_wav(const String &p_path);
- virtual Ref<AudioStreamPlayback> instance_playback();
- virtual String get_stream_name() const;
+ virtual Ref<AudioStreamPlayback> instance_playback() override;
+ virtual String get_stream_name() const override;
AudioStreamSample();
~AudioStreamSample();