Skip to content

Commit

Permalink
fix: resample audio asset cuz pitch rate stopped working in gd4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
akorzunin committed Aug 16, 2024
1 parent 5744f2f commit 8c2d6ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 14 additions & 0 deletions scripts/respeed_audio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Define the source and target files
SOURCE_FILE="assets/build/ost/section_change.wav"
TARGET_FILE="assets/build/ost/section_change_v1.wav"

# Define the speed adjustment factor

SPEED_FACTOR=1.95

# FFmpeg command to adjust speed and save the file
ffmpeg -i "$SOURCE_FILE" -filter:a \
"asetrate=44100*$SPEED_FACTOR,aresample=44100,aresample=resampler=soxr:out_sample_rate=41000" \
"$TARGET_FILE"
1 change: 0 additions & 1 deletion src/scenes/MainScene.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ script = ExtResource("5_6wmow")

[node name="SectionChanged" type="AudioStreamPlayer" parent="SfxPlayer"]
stream = ExtResource("6_qd6xe")
pitch_scale = 1.95
bus = &"sfx"

[node name="SectionSelect" type="AudioStreamPlayer" parent="SfxPlayer"]
Expand Down

0 comments on commit 8c2d6ce

Please sign in to comment.