mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
Merge commit godotengine/godot@841596cae4
This commit is contained in:
@@ -272,6 +272,13 @@ uint64_t FileAccessCompressed::get_buffer(uint8_t *p_dst, uint64_t p_length) con
|
||||
read_block_size = read_block == read_block_count - 1 ? read_total % block_size : block_size;
|
||||
read_pos = 0;
|
||||
|
||||
if (read_block_size == 0) {
|
||||
at_end = true;
|
||||
if (i + 1 < p_length) {
|
||||
read_eof = true;
|
||||
}
|
||||
return i + 1;
|
||||
}
|
||||
} else {
|
||||
read_block--;
|
||||
at_end = true;
|
||||
|
||||
@@ -22,18 +22,21 @@ if command -v jq 2>&1 >/dev/null; then
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo 'Error: Could not find 'jq' command. Is jq installed? Try running "brew install jq" or "port install jq" and rerunning this script.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download and install the Vulkan SDK.
|
||||
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip" -o /tmp/vulkan-sdk.zip
|
||||
unzip /tmp/vulkan-sdk.zip -d /tmp
|
||||
|
||||
if [ -d "/tmp/InstallVulkan-$new_ver_full.app" ]; then
|
||||
/tmp/InstallVulkan-$new_ver_full.app/Contents/MacOS/InstallVulkan-$new_ver_full --accept-licenses --default-answer --confirm-command install
|
||||
rm -rf /tmp/InstallVulkan-$new_ver_full.app
|
||||
elif [ -d "/tmp/InstallVulkan.app" ]; then
|
||||
/tmp/InstallVulkan.app/Contents/MacOS/InstallVulkan --accept-licenses --default-answer --confirm-command install
|
||||
rm -rf /tmp/InstallVulkan.app
|
||||
if [ -d "/tmp/vulkansdk-macOS-$new_ver_full.app" ]; then
|
||||
/tmp/vulkansdk-macOS-$new_ver_full.app/Contents/MacOS/vulkansdk-macOS-$new_ver_full --accept-licenses --default-answer --confirm-command install
|
||||
rm -rf /tmp/vulkansdk-macOS-$new_ver_full.app
|
||||
else
|
||||
echo "Couldn't install the Vulkan SDK, the unzipped contents may no longer match what this script expects."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f /tmp/vulkan-sdk.zip
|
||||
|
||||
@@ -162,8 +162,13 @@ void SMBPitchShift::PitchShift(float pitchShift, long numSampsToProcess, long ff
|
||||
|
||||
/* ***************** PROCESSING ******************* */
|
||||
/* this does the actual pitch shifting */
|
||||
memset(gSynMagn, 0, fftFrameSize*sizeof(float));
|
||||
memset(gSynFreq, 0, fftFrameSize*sizeof(float));
|
||||
size_t fftBufferSize = static_cast<size_t>(fftFrameSize) * sizeof(float);
|
||||
if (unlikely(fftBufferSize > MAX_FRAME_LENGTH)) {
|
||||
ERR_PRINT_ONCE("Invalid FFT frame size for PitchShift. This is a bug, please report.");
|
||||
return;
|
||||
}
|
||||
memset(gSynMagn, 0, fftBufferSize);
|
||||
memset(gSynFreq, 0, fftBufferSize);
|
||||
for (k = 0; k <= fftFrameSize2; k++) {
|
||||
index = k*pitchShift;
|
||||
if (index <= fftFrameSize2) {
|
||||
@@ -216,7 +221,7 @@ void SMBPitchShift::PitchShift(float pitchShift, long numSampsToProcess, long ff
|
||||
}
|
||||
|
||||
/* shift accumulator */
|
||||
memmove(gOutputAccum, gOutputAccum+stepSize, fftFrameSize*sizeof(float));
|
||||
memmove(gOutputAccum, gOutputAccum+stepSize, fftBufferSize);
|
||||
|
||||
/* move input FIFO */
|
||||
for (k = 0; k < inFifoLatency; k++) { gInFIFO[k] = gInFIFO[k+stepSize];
|
||||
|
||||
Reference in New Issue
Block a user