Go to the source code of this file.
◆ SpeakerChange()
Definition at line 196 of file speaker.c.
197{
199
200 BOOLEAN Timer2Gate = !!(Port61hValue & 0x01);
201 BOOLEAN SpeakerOn = !!(Port61hValue & 0x02);
202
203 DPRINT(
"SpeakerChange -- Timer2Gate == %s ; SpeakerOn == %s\n",
204 Timer2Gate ? "true" : "false", SpeakerOn ? "true" : "false");
205
206 if (Timer2Gate)
207 {
208 if (SpeakerOn)
209 {
210
214
216 }
217 else
218 {
219
221 }
222 }
223 else
224 {
225 if (SpeakerOn)
226 {
227 if (OldSpeakerOff)
228 {
229 OldSpeakerOff =
FALSE;
231 }
232
237 else
239 }
240 else
241 {
242 OldSpeakerOff =
TRUE;
243
244
245
246
247
249 {
252
253
255 }
256 }
257 }
258}
DWORD WINAPI GetTickCount(VOID)
WORD PitGetReloadValue(BYTE Channel)
static LARGE_INTEGER Frequency
#define PIT_BASE_FREQUENCY
static VOID MakeBeep(ULONG Frequency, ULONG Duration)
static VOID PulseSample(VOID)
static LARGE_INTEGER CountStart
static ULONG PulseTickCount
Referenced by PitChan2Out(), and Port61hWrite().
◆ SpeakerCleanup()
◆ SpeakerInitialize()
Definition at line 260 of file speaker.c.
261{
266
267
270 {
271 wprintf(
L"FATAL: Performance counter not available\n");
272 }
273
274
282 0,
285 0,
287 0);
289 {
290 DPRINT1(
"Failed to open the Beep driver, Status 0x%08lx\n",
Status);
291
292 }
293}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
NTSTATUS NTAPI NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL)
static LARGE_INTEGER FreqCount
Referenced by EmulatorInitialize().