NXT Functions Sound
From ROBOTC API Guide
NXT → Functions and Variables → Sound
| ROBOTC provides a comprehensive suite of functions for controlling the NXT speaker.
|
|
| |||||||
bPlaySounds
| word bPlaySounds | |
| (word) Boolean flag. Indicates whether new sound requests should be accepted or discarded. Note that this is defined as a word but is treated as a bool. | |
|
bSoundActive
| const bool bSoundActive | |
| (bool) Boolean flag. If true indicates sound system is actively playing sound. | |
|
bSoundQueueAvailable
| const bool bSoundQueueAvailable | |
| (bool) Boolean flag. Indicates whether there is space available in the sound queue for another item. | |
|
ClearSounds
| void ClearSounds() | |
| (void) Clears all existing and buffered sound commands. | |
|
MuteSound
| void MuteSound() | |
| (void) Mutes all subsequent sound commands. | |
|
nVolume
| word nVolume | |
| (word) Sound volume. Range 0 to 4 (loudest). | |
|
PlayImmediateTone
| void PlayImmediateTone(const int frequency, const int durationIn10MsecTicks) | |||||||||
| (void) Immediately play tone at frequency & duration ahead of queued requests. | |||||||||
| |||||||||
|
PlaySound
| void PlaySound(TSounds sound) | ||||||
| (void) Play one of the system predefined sounds (buzz, beep, click, ...) | ||||||
| ||||||
|
PlaySoundFile
| void PlaySoundFile(const string &sFileName) | ||||||
| (void) Plays a sound file from the NXT file system. File must be present on the NXT. RobotC will automatically download required files with user program. | ||||||
| ||||||
|
PlayTone
| void PlayTone(const int frequency, const int durationIn10MsecTicks) | |||||||||
| (void) Plays a constant tone at the specified frequency and duration. | |||||||||
| |||||||||
|
UnmuteSound
| void UnmuteSound() | |
| (void) Restores sound playback volume. | |
|