MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / SSI_Output

Function SSI_Output

source/SSI263.cpp:80–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78static int totalDuration_ms = 0;
79
80void SSI_Output(void)
81{
82 int ssi0 = ssiRegs[SSI_DURPHON];
83 int ssi2 = ssiRegs[SSI_RATEINF];
84
85 LogOutput("SSI: ");
86 for (int i = 0; i <= 4; i++)
87 {
88 std::string r = (ssiRegs[i] >= 0) ? ByteToHexStr(ssiRegs[i]) : "--";
89 LogOutput("%s ", r.c_str());
90 ssiRegs[i] = -1;
91 }
92
93 if (ssi0 != -1 && ssi2 != -1)
94 {
95 int phonemeDuration_ms = (((16-(ssi2>>4))*4096)/1023) * (4-(ssi0>>6));
96 totalDuration_ms += phonemeDuration_ms;
97 LogOutput("/ duration = %d (total = %d) ms", phonemeDuration_ms, totalDuration_ms);
98 }
99
100 LogOutput("\n");
101}
102#endif
103
104//-----------------------------------------------------------------------------

Callers 1

WriteMethod · 0.85

Calls 2

LogOutputFunction · 0.85
ByteToHexStrFunction · 0.85

Tested by

no test coverage detected