From 089d7fa171e3a3305991047e82b4043d4f05783f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 15 Dec 2014 15:42:58 -0300 Subject: Small batch of fixes -=-=-=-=-=-=-=-=-=-= -Fixed looping error in AudioStreamResampled -winrt port progress -fixes in material in ambient light --- scene/resources/audio_stream_resampled.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/resources/audio_stream_resampled.h') diff --git a/scene/resources/audio_stream_resampled.h b/scene/resources/audio_stream_resampled.h index f1e3629ac7..a1b95e81d5 100644 --- a/scene/resources/audio_stream_resampled.h +++ b/scene/resources/audio_stream_resampled.h @@ -57,7 +57,7 @@ class AudioStreamResampled : public AudioStream { template - void _resample(int32_t *p_dest,int p_todo,int32_t p_increment); + uint32_t _resample(int32_t *p_dest,int p_todo,int32_t p_increment); protected: @@ -97,7 +97,7 @@ protected: _FORCE_INLINE_ int16_t *get_write_buffer() { return read_buf; } _FORCE_INLINE_ void write(uint32_t p_frames) { - ERR_FAIL_COND(p_frames > rb_len); + ERR_FAIL_COND(p_frames >= rb_len); switch(channels) { case 1: { -- cgit v1.2.3