mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add 64-bit versions of core power of 2 functions
This commit is contained in:
parent
64b09905c7
commit
f6f1df7d73
25 changed files with 161 additions and 124 deletions
|
|
@ -79,7 +79,7 @@ Ref<AudioEffectInstance> AudioEffectCapture::instantiate() {
|
|||
if (!buffer_initialized) {
|
||||
float target_buffer_size = AudioServer::get_singleton()->get_mix_rate() * buffer_length_seconds;
|
||||
ERR_FAIL_COND_V(target_buffer_size <= 0 || target_buffer_size >= (1 << 27), Ref<AudioEffectInstance>());
|
||||
buffer.resize(nearest_shift((int)target_buffer_size));
|
||||
buffer.resize(nearest_shift((uint32_t)target_buffer_size));
|
||||
buffer_initialized = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Ref<AudioStreamPlayback> AudioStreamGenerator::instantiate_playback() {
|
|||
Ref<AudioStreamGeneratorPlayback> playback;
|
||||
playback.instantiate();
|
||||
playback->generator = this;
|
||||
int target_buffer_size = _get_target_rate() * buffer_len;
|
||||
uint32_t target_buffer_size = _get_target_rate() * buffer_len;
|
||||
playback->buffer.resize(nearest_shift(target_buffer_size));
|
||||
playback->buffer.clear();
|
||||
return playback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue