Skip to content

Commit

Permalink
Update PCSpeaker.cs
Browse files Browse the repository at this point in the history
Removed junk code, may have fixed ever-lasting beep issue
The code already in Cosmos didn't work, and I tried the C & operand as used in OSDev, to no avail
This has not been tested, but it will either only work or not do anything different
  • Loading branch information
Arawn Davies authored Apr 14, 2018
1 parent a1c72e1 commit 5e6d3ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Cosmos.HAL2/PCSpeaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ private static void EnableSound()
}
private static void DisableSound()
{
IO.Port61.Byte = (byte)(IO.Port61.Byte | 0xFC);
IO.Port61.Byte = (byte)(IO.Port61.Byte & ~3);
//IO.Port61.Byte = (byte)(IO.Port61.Byte | 0xFC);
}

public static void Beep(uint frequency)
Expand Down Expand Up @@ -61,7 +62,6 @@ public static void Beep(uint frequency, uint duration)
SpeakerPIT.Wait(duration);
DisableSound();
}
internal static bool called = false;
}

/*
Expand Down

0 comments on commit 5e6d3ba

Please sign in to comment.