From 1e6552876343b976b684eecdfa70217c3cb683ec Mon Sep 17 00:00:00 2001 From: tomcw Date: Fri, 3 Jun 2022 22:16:20 +0100 Subject: [PATCH] SC01: use max amplitude --- source/SSI263.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/SSI263.cpp b/source/SSI263.cpp index 9e689cbb..00a13636 100644 --- a/source/SSI263.cpp +++ b/source/SSI263.cpp @@ -312,14 +312,14 @@ void SSI263::Play(unsigned int nPhoneme) return; } + DWORD volume = 0; // 0=max if (!m_isVotraxPhoneme) - { - const DWORD volume = AMPLITUDE_MASK - (m_ctrlArtAmp & AMPLITUDE_MASK); // Invert so that: 0=max, 15=min - SSI263SingleVoice.nVolume = NewVolume(volume*volume, AMPLITUDE_MASK*AMPLITUDE_MASK); // logarithmic, but amplitude<8 can't be heard - HRESULT hr = SSI263SingleVoice.lpDSBvoice->SetVolume(SSI263SingleVoice.nVolume); - if (hr != S_OK) - LogFileOutput("SSI263::Play: SetVolume(%d) res = %08X\n", SSI263SingleVoice.nVolume, hr); - } + volume = AMPLITUDE_MASK - (m_ctrlArtAmp & AMPLITUDE_MASK); // Invert so that: 0=max, 15=min + + SSI263SingleVoice.nVolume = NewVolume(volume*volume, AMPLITUDE_MASK*AMPLITUDE_MASK); // logarithmic, but amplitude<8 can't be heard + HRESULT hr = SSI263SingleVoice.lpDSBvoice->SetVolume(SSI263SingleVoice.nVolume); + if (hr != S_OK) + LogFileOutput("SSI263::Play: SetVolume(%d) res = %08X\n", SSI263SingleVoice.nVolume, hr); if (m_dbgFirst) {