From f182258e4e9ec6b4fc017d052777c1021c976e79 Mon Sep 17 00:00:00 2001 From: Sean Maas Date: Wed, 10 Mar 2021 17:11:49 -0500 Subject: [PATCH] Use python for frequency division Fixes #7 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 93fd41cd..af094b8f 100644 --- a/Makefile +++ b/Makefile @@ -184,6 +184,7 @@ TOOLS_DIR := tools # in the makefile that we want should cover assets.) PYTHON := python3 +SOX := sox ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),) @@ -642,11 +643,11 @@ endif ifdef TARGET_NDS $(BUILD_DIR)/%.half.wav: %.aiff $(call print,Converting AIFF:,$<,$@) - $(V)sox $^ -r $(shell echo $(shell sox --i -r $^) / 2 | bc) $@ + $(V)$(SOX) $^ -r $(shell $(PYTHON) -c "print($(shell $(SOX) --i -r $^) / 2)") $@ $(BUILD_DIR)/%.wav: %.aiff $(call print,Converting AIFF:,$<,$@) - $(V)sox $^ $@ + $(V)$(SOX) $^ $@ $(BUILD_DIR)/%.ima: $(BUILD_DIR)/%.wav $(call print,Encoding IMA:,$<,$@)