AppleWin/source/Speaker.h
TomCh 96bbc0c435
Improve SSI263 (PR #939)
New class for SSI263 (2 instances per MB/Phasor card)
- support 2nd SSI263 at $Cn20 connected to 6522-A (at $Cn00)

Switch from one-shot phoneme playback to ring-buffer
Use a new dedicated ring-buffer (distinct from the AY8910 ring buffer)
Gets rid of: SSI263Thread, the 2 events, and the 64 voices

Support the 2-bit Duration b7:6 of phoneme register for both SC01 & SSI263 (to fix #929)
Updated save-state
Updated IRQ logging (output cycle & 6522 source)
2021-03-23 22:01:41 +00:00

37 lines
1.0 KiB
C

#pragma once
// Registry soundtype:
#define REG_SOUNDTYPE_NONE 0
#define REG_SOUNDTYPE_DIRECT 1 // Not supported from 1.26
#define REG_SOUNDTYPE_SMART 2 // Not supported from 1.26
#define REG_SOUNDTYPE_WAVE 3
enum SoundType_e
{
SOUND_NONE = 0,
SOUND_WAVE
};
extern SoundType_e soundtype;
extern double g_fClksPerSpkrSample;
extern bool g_bQuieterSpeaker;
extern short g_nSpeakerData;
void SpkrDestroy ();
void SpkrInitialize ();
void SpkrReinitialize ();
void SpkrReset();
void SpkrSetEmulationType (SoundType_e newSoundType);
void SpkrUpdate (DWORD);
void SpkrUpdate_Timer();
DWORD SpkrGetVolume();
void SpkrSetVolume(DWORD dwVolume, DWORD dwVolumeMax);
void Spkr_Mute();
void Spkr_Unmute();
bool Spkr_IsActive();
bool Spkr_DSInit();
void SpkrSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void SpkrLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
BYTE __stdcall SpkrToggle (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);