diff --git a/assets/music/main_theme.wav b/assets/music/main_theme.wav index 115ae3f..1029d22 100644 Binary files a/assets/music/main_theme.wav and b/assets/music/main_theme.wav differ diff --git a/assets/music/main_theme.wav.import b/assets/music/main_theme.wav.import index a9e41ac..5dba7ca 100644 --- a/assets/music/main_theme.wav.import +++ b/assets/music/main_theme.wav.import @@ -15,7 +15,7 @@ force/8_bit=false force/mono=false force/max_rate=false force/max_rate_hz=44100 -edit/trim=false +edit/trim=true edit/normalize=false -edit/loop=false +edit/loop=true compress/mode=0 diff --git a/assets/source/music/src/music/songs/main_theme.clj b/assets/source/music/src/music/songs/main_theme.clj index 1838c4c..dddff33 100644 --- a/assets/source/music/src/music/songs/main_theme.clj +++ b/assets/source/music/src/music/songs/main_theme.clj @@ -13,4 +13,4 @@ 1/4 :-d :-a 1/8 :-e :-c 1/4 :-g :d :-f 1/8 :e :g 1/4 :f :a 1/16 :g 1/4 :f 1/2 :c]) [:piano :violin :acoustic-bass]))) (concat - (map intro [70 100])) + (map intro [70])) diff --git a/music/MusicPlayer.gd b/music/MusicPlayer.gd index df04cdd..8232a58 100644 --- a/music/MusicPlayer.gd +++ b/music/MusicPlayer.gd @@ -2,11 +2,14 @@ extends Node export var main_theme: AudioStream -onready var themes = {"main": main_theme} +var current_theme = null +onready var themes = {"main": main_theme} onready var player: AudioStreamPlayer = $Player func play_theme(theme: String) -> void: - player.stream = themes[theme] - player.play() + if theme != current_theme: + player.stream = themes[theme] + player.play() + current_theme = theme