diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-10-28 19:04:25 +0700 |
---|---|---|
committer | Poommetee Ketson <poommetee@protonmail.com> | 2017-10-28 19:15:51 +0700 |
commit | 83f5d7e40aa4457e5edfbe4f495c3c9b075b39b3 (patch) | |
tree | 689e1870094033a52d9e97b3c0e6c837c3b5da29 | |
parent | 87dbb716d9c99b03755cf2f875d6cdba51f8d356 (diff) |
Refactor bufer to buffer
-rw-r--r-- | modules/opus/audio_stream_opus.cpp | 6 | ||||
-rw-r--r-- | modules/opus/audio_stream_opus.h | 2 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 8 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.h | 2 | ||||
-rw-r--r-- | scene/resources/video_stream.h | 2 | ||||
-rw-r--r-- | servers/audio/audio_stream.cpp | 6 | ||||
-rw-r--r-- | servers/audio/audio_stream.h | 6 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp index c7748b9b21..06eab4c94d 100644 --- a/modules/opus/audio_stream_opus.cpp +++ b/modules/opus/audio_stream_opus.cpp @@ -267,7 +267,7 @@ void AudioStreamPlaybackOpus::seek(float p_time) { frames_mixed = osrate * p_time; } -int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) { +int AudioStreamPlaybackOpus::mix(int16_t *p_buffer, int p_frames) { if (!playing) return 0; @@ -281,7 +281,7 @@ int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) { break; } - int ret = op_read(opus_file, (opus_int16 *)p_bufer, todo * stream_channels, ¤t_section); + int ret = op_read(opus_file, (opus_int16 *)p_buffer, todo * stream_channels, ¤t_section); if (ret < 0) { playing = false; ERR_EXPLAIN("Error reading Opus File: " + file); @@ -325,7 +325,7 @@ int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) { frames_mixed += ret; - p_bufer += ret * stream_channels; + p_buffer += ret * stream_channels; p_frames -= ret; } diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h index 7b7740a804..f8d8f585cf 100644 --- a/modules/opus/audio_stream_opus.h +++ b/modules/opus/audio_stream_opus.h @@ -107,7 +107,7 @@ public: virtual int get_minimum_buffer_size() const; - virtual int mix(int16_t *p_bufer, int p_frames); + virtual int mix(int16_t *p_buffer, int p_frames); AudioStreamPlaybackOpus(); ~AudioStreamPlaybackOpus(); diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 0afb889199..6235799fc2 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -92,7 +92,7 @@ long AudioStreamPlaybackOGGVorbis::_ov_tell_func(void *_f) { return fa->get_position(); } -int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) { +int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_buffer, int p_frames) { if (!playing) return 0; @@ -109,9 +109,9 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) { //printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t)); #ifdef BIG_ENDIAN_ENABLED - long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, ¤t_section); + long ret = ov_read(&vf, (char *)p_buffer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, ¤t_section); #else - long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 0, 2, 1, ¤t_section); + long ret = ov_read(&vf, (char *)p_buffer, todo * stream_channels * sizeof(int16_t), 0, 2, 1, ¤t_section); #endif if (ret < 0) { @@ -162,7 +162,7 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) { frames_mixed += ret; - p_bufer += ret * stream_channels; + p_buffer += ret * stream_channels; p_frames -= ret; } diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h index 929b2651e9..79eadec56e 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.h +++ b/modules/vorbis/audio_stream_ogg_vorbis.h @@ -103,7 +103,7 @@ public: virtual int get_mix_rate() const { return stream_srate; } virtual int get_minimum_buffer_size() const { return 0; } - virtual int mix(int16_t *p_bufer, int p_frames); + virtual int mix(int16_t *p_buffer, int p_frames); AudioStreamPlaybackOGGVorbis(); ~AudioStreamPlaybackOGGVorbis(); diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h index 0f07233185..3f79858056 100644 --- a/scene/resources/video_stream.h +++ b/scene/resources/video_stream.h @@ -60,7 +60,7 @@ public: virtual void set_audio_track(int p_idx) = 0; - //virtual int mix(int16_t* p_bufer,int p_frames)=0; + //virtual int mix(int16_t* p_buffer,int p_frames)=0; virtual Ref<Texture> get_texture() = 0; virtual void update(float p_delta) = 0; diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 0e3d5824d9..d7b2c2c5e0 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -191,12 +191,12 @@ void AudioStreamPlaybackRandomPitch::seek(float p_time) { } } -void AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames) { +void AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) { if (playing.is_valid()) { - playing->mix(p_bufer, p_rate_scale * pitch_scale, p_frames); + playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames); } else { for (int i = 0; i < p_frames; i++) { - p_bufer[i] = AudioFrame(0, 0); + p_buffer[i] = AudioFrame(0, 0); } } } diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h index 3324597b41..dc931502b4 100644 --- a/servers/audio/audio_stream.h +++ b/servers/audio/audio_stream.h @@ -48,7 +48,7 @@ public: virtual float get_playback_position() const = 0; virtual void seek(float p_time) = 0; - virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames) = 0; + virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) = 0; virtual float get_length() const = 0; //if supported, otherwise return 0 }; @@ -70,7 +70,7 @@ class AudioStreamPlaybackResampled : public AudioStreamPlayback { protected: void _begin_resample(); - virtual void _mix_internal(AudioFrame *p_bufer, int p_frames) = 0; + virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) = 0; virtual float get_stream_sampling_rate() = 0; public: @@ -136,7 +136,7 @@ public: virtual float get_playback_position() const; virtual void seek(float p_time); - virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames); + virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames); virtual float get_length() const; //if supported, otherwise return 0 diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 302f13ee4f..425381550e 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -281,7 +281,7 @@ class VisualServerRaster : public VisualServer { Set<Instance*> owned_instances; BakedLightSampler *sampler; int resolution; - Vector<Color> light_bufer; + Vector<Color> light_buffer; RID sampled_light; uint64_t last_pass; Transform xform; // viewspace normal to lightspace, might not use one. |