diff options
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/audio_mixer_sw.cpp | 6 | ||||
-rw-r--r-- | servers/audio/audio_server_sw.cpp | 2 | ||||
-rw-r--r-- | servers/audio/audio_server_sw.h | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/servers/audio/audio_mixer_sw.cpp b/servers/audio/audio_mixer_sw.cpp index 64369182b1..17f8c36c9a 100644 --- a/servers/audio/audio_mixer_sw.cpp +++ b/servers/audio/audio_mixer_sw.cpp @@ -75,7 +75,7 @@ void AudioMixerSW::do_resample(const Depth* p_src, int32_t *p_dst, ResamplerStat for(int i=0;i<(is_stereo?2:1);i++) { - int16_t nibble,signed_nibble,diff,step; + int16_t nibble,diff,step; p_state->ima_adpcm[i].last_nibble++; const uint8_t *src_ptr=p_state->ima_adpcm[i].ptr; @@ -92,10 +92,6 @@ void AudioMixerSW::do_resample(const Depth* p_src, int32_t *p_dst, ResamplerStat if (p_state->ima_adpcm[i].step_index>88) p_state->ima_adpcm[i].step_index=88; - /* - signed_nibble = (nibble&7) * ((nibble&8)?-1:1); - diff = (2 * signed_nibble + 1) * step / 4; */ - diff = step >> 3 ; if (nibble & 1) diff += step >> 2 ; diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp index 8b5b5e4f46..853714be2a 100644 --- a/servers/audio/audio_server_sw.cpp +++ b/servers/audio/audio_server_sw.cpp @@ -388,7 +388,7 @@ void AudioServerSW::sample_set_data(RID p_sample, const DVector<uint8_t>& p_buff AUDIO_LOCK sample_manager->sample_set_data(p_sample,p_buffer); } -const DVector<uint8_t> AudioServerSW::sample_get_data(RID p_sample) const { +DVector<uint8_t> AudioServerSW::sample_get_data(RID p_sample) const { AUDIO_LOCK return sample_manager->sample_get_data(p_sample); } diff --git a/servers/audio/audio_server_sw.h b/servers/audio/audio_server_sw.h index 8d3d992e2b..fda952fa94 100644 --- a/servers/audio/audio_server_sw.h +++ b/servers/audio/audio_server_sw.h @@ -126,7 +126,7 @@ public: const void* sample_get_data_ptr(RID p_sample) const; virtual void sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer); - virtual const DVector<uint8_t> sample_get_data(RID p_sample) const; + virtual DVector<uint8_t> sample_get_data(RID p_sample) const; virtual void sample_set_mix_rate(RID p_sample,int p_rate); virtual int sample_get_mix_rate(RID p_sample) const; |