From f67d41d313b7dc85f6fb99e79e515cc9d208cfff Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Tue, 12 Sep 2017 20:17:09 -0400 Subject: [PATCH] Make Mac build generate audio The initialization of SynthUnit changed (a long time ago), but the Mac app was never updated. Note, the Mac app probably still needs hand-editing so it can find the ROM file, and maybe also the MIDI device. --- app/src/main/jni/SynthApp/SynthMain.mm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/jni/SynthApp/SynthMain.mm b/app/src/main/jni/SynthApp/SynthMain.mm index 9eadd39..82d69ec 100644 --- a/app/src/main/jni/SynthApp/SynthMain.mm +++ b/app/src/main/jni/SynthApp/SynthMain.mm @@ -60,7 +60,7 @@ OSStatus SynthMain::setupplayback(SynthUnit *synth_unit) { description.componentFlags = 0; description.componentFlagsMask = 0; - if (component = FindNextComponent(NULL, &description)) { + if ((component = FindNextComponent(NULL, &description))) { err = OpenAComponent(component, &audioUnit_); if (err != noErr) return err; } @@ -156,10 +156,8 @@ int SynthMain::Load(const char *filename) { int SynthMain::SynthInit() { double sample_rate = 44100.0; - Freqlut::init(sample_rate); - Sawtooth::init(sample_rate); - Sin::init(); synth_unit_ = new SynthUnit(&ring_buffer_); + SynthUnit::Init(sample_rate); if (true) { const char *fn = "/Users/raph/dx7/ROM1A.SYX"; Load(fn);