From 14bdbd852ec39b0ac2ab1c1f5c98ccd241323ff5 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 9 Mar 2025 09:12:42 +0100 Subject: [PATCH] swan: Minor fixes --- src/engine/platform/swan.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/swan.cpp b/src/engine/platform/swan.cpp index e1689c7b5..a1a72a144 100644 --- a/src/engine/platform/swan.cpp +++ b/src/engine/platform/swan.cpp @@ -584,7 +584,7 @@ int DivPlatformSwan::getRegisterPoolSize() { void DivPlatformSwan::reset() { while (!writes.empty()) writes.pop(); while (!postDACWrites.empty()) postDACWrites.pop(); - memset(regPool,0,64); + memset(regPool,0,sizeof(regPool)); for (int i=0; i<4; i++) { chan[i]=Channel(); chan[i].vol=15; @@ -608,6 +608,7 @@ void DivPlatformSwan::reset() { dacPos=0; dacSample=-1; sampleBank=0; + rWrite(0x0f,0x00); // wave table at 0x0000 rWrite(0x11,0x0f); // enable speakers, minimum headphone volume } @@ -652,11 +653,12 @@ int DivPlatformSwan::init(DivEngine* p, int channels, int sugRate, const DivConf parent=p; dumpWrites=false; skipRegisterWrites=false; + for (int i=0; i<4; i++) { isMuted[i]=false; oscBuf[i]=new DivDispatchOscBuffer; } - swan_sound_init(&ws, true); + setFlags(flags); reset(); return 4;