Class PCSpeaker
Inheritance
System.Object
PCSpeaker
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.HAL
Assembly: Cosmos.HAL2.dll
Syntax
public class PCSpeaker
Fields
| Improve this Doc View SourceChannel2Data
Channel to data IO port.
Declaration
public const int Channel2Data = 66
Field Value
Type | Description |
---|---|
System.Int32 |
CommandRegister
Command register IO port.
Declaration
public const int CommandRegister = 67
Field Value
Type | Description |
---|---|
System.Int32 |
Gate
Gate IO port.
Declaration
public const int Gate = 97
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceBeep(UInt32)
Play beep sound, at a specified frequency for a specified duration.
Declaration
public static void Beep(uint frequency)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | frequency | Audio frequency in Hz, must be between 37 and 32767Hz. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if frequency is invalid. |
Beep(UInt32, UInt32)
Play beep sound, at a specified frequency for a specified duration.
Declaration
public static void Beep(uint frequency, uint duration)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | frequency | Audio frequency in Hz, must be between 37 and 32767Hz. |
System.UInt32 | duration | Beep duration, must be > 0. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if duration or frequency invalid. |