diff --git a/source/Applewin.cpp b/source/Applewin.cpp index 82d5c611..c427352b 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -145,15 +145,15 @@ void LogPerfTimings(void) UINT64 other = g_timeTotal - g_timeCpu - g_timeSpeaker - g_timeMB_NoTimer - g_timeVideoRefresh; LogOutput("Perf breakdown:\n"); - LogOutput(". CPU %% = %2f.2\n", (double)cpu / (double)g_timeTotal * 100.0); - LogOutput(". Video %% = %2f.2\n", (double)video / (double)g_timeTotal * 100.0); - LogOutput("... NTSC %% = %2f.2\n", (double)g_timeVideo / (double)g_timeTotal * 100.0); - LogOutput("... refresh %% = %2f.2\n", (double)g_timeVideoRefresh / (double)g_timeTotal * 100.0); - LogOutput(". Audio %% = %2f.2\n", (double)audio / (double)g_timeTotal * 100.0); - LogOutput("... Speaker %% = %2f.2\n", (double)spkr / (double)g_timeTotal * 100.0); - LogOutput("... MB %% = %2f.2\n", (double)mb / (double)g_timeTotal * 100.0); - LogOutput(". Other %% = %2f.2\n", (double)other / (double)g_timeTotal * 100.0); - LogOutput(". TOTAL %% = %2f.2\n", (double)(cpu+video+audio+other) / (double)g_timeTotal * 100.0); + LogOutput(". CPU %% = %6.2f\n", (double)cpu / (double)g_timeTotal * 100.0); + LogOutput(". Video %% = %6.2f\n", (double)video / (double)g_timeTotal * 100.0); + LogOutput("... NTSC %% = %6.2f\n", (double)g_timeVideo / (double)g_timeTotal * 100.0); + LogOutput("... refresh %% = %6.2f\n", (double)g_timeVideoRefresh / (double)g_timeTotal * 100.0); + LogOutput(". Audio %% = %6.2f\n", (double)audio / (double)g_timeTotal * 100.0); + LogOutput("... Speaker %% = %6.2f\n", (double)spkr / (double)g_timeTotal * 100.0); + LogOutput("... MB %% = %6.2f\n", (double)mb / (double)g_timeTotal * 100.0); + LogOutput(". Other %% = %6.2f\n", (double)other / (double)g_timeTotal * 100.0); + LogOutput(". TOTAL %% = %6.2f\n", (double)(cpu+video+audio+other) / (double)g_timeTotal * 100.0); } } #endif diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp index 17747527..ea2809cb 100644 --- a/source/Mockingboard.cpp +++ b/source/Mockingboard.cpp @@ -87,6 +87,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Mockingboard.h" #include "SoundCore.h" #include "YamlHelper.h" +#include "Riff.h" #include "AY8910.h" #include "SSI263Phonemes.h" @@ -1281,13 +1282,13 @@ static bool MB_DSInit() FALSE, // bManualReset (FALSE = auto-reset) FALSE, // bInitialState (FALSE = non-signaled) NULL); // lpName - LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[0]=0x%08X\n", (UINT32)g_hSSI263Event[0]); + LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[0]=0x%08X\n", g_hSSI263Event[0]); g_hSSI263Event[1] = CreateEvent(NULL, // lpEventAttributes FALSE, // bManualReset (FALSE = auto-reset) FALSE, // bInitialState (FALSE = non-signaled) NULL); // lpName - LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[1]=0x%08X\n", (UINT32)g_hSSI263Event[1]); + LogFileOutput("MB_DSInit: CreateEvent(), g_hSSI263Event[1]=0x%08X\n", g_hSSI263Event[1]); if((g_hSSI263Event[0] == NULL) || (g_hSSI263Event[1] == NULL)) { @@ -1389,7 +1390,7 @@ static bool MB_DSInit() NULL, // lpParameter 0, // dwCreationFlags : 0 = Run immediately &dwThreadId); // lpThreadId - LogFileOutput("MB_DSInit: CreateThread(), g_hThread=0x%08X\n", (UINT32)g_hThread); + LogFileOutput("MB_DSInit: CreateThread(), g_hThread=0x%08X\n", g_hThread); BOOL bRes2 = SetThreadPriority(g_hThread, THREAD_PRIORITY_TIME_CRITICAL); LogFileOutput("MB_DSInit: SetThreadPriority(), bRes=%d\n", bRes2 ? 1 : 0); diff --git a/source/Riff.cpp b/source/Riff.cpp index 19897a99..d7172c99 100644 --- a/source/Riff.cpp +++ b/source/Riff.cpp @@ -35,7 +35,7 @@ static DWORD dwDataOffset; static DWORD g_dwTotalNumberOfBytesWritten = 0; static unsigned int g_NumChannels = 2; -int RiffInitWriteFile(char* pszFile, unsigned int sample_rate, unsigned int NumChannels) +int RiffInitWriteFile(const char* pszFile, unsigned int sample_rate, unsigned int NumChannels) { g_hRiffFile = CreateFile(pszFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); @@ -117,7 +117,7 @@ int RiffFinishWriteFile() return CloseHandle(g_hRiffFile); } -int RiffPutSamples(short* buf, unsigned int uSamples) +int RiffPutSamples(const short* buf, unsigned int uSamples) { if(g_hRiffFile == INVALID_HANDLE_VALUE) return 1; diff --git a/source/Riff.h b/source/Riff.h index d1d44f8a..10186efe 100644 --- a/source/Riff.h +++ b/source/Riff.h @@ -1,5 +1,5 @@ #pragma once -int RiffInitWriteFile(char* pszFile, unsigned int sample_rate, unsigned int NumChannels); +int RiffInitWriteFile(const char* pszFile, unsigned int sample_rate, unsigned int NumChannels); int RiffFinishWriteFile(); -int RiffPutSamples(short* buf, unsigned int uSamples); +int RiffPutSamples(const short* buf, unsigned int uSamples); diff --git a/source/Speaker.cpp b/source/Speaker.cpp index 0cb80683..7805fd36 100644 --- a/source/Speaker.cpp +++ b/source/Speaker.cpp @@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Speaker.h" #include "Video.h" // VideoRedrawScreen() #include "YamlHelper.h" +#include "Riff.h" #include "Debugger/Debug.h" // For DWORD extbench