Interface IToneGenerator
Audio tones generator that plays tones at a given frequency
Assembly: Meadow.Contracts.dll
View Source
public interface IToneGenerator
Methods
PlayTone(Frequency, TimeSpan)
Plays the tone with a specified frequency and duration
View Source
Task PlayTone(Frequency frequency, TimeSpan duration)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Frequency | frequency | The tone frequency |
System.TimeSpan | duration | The duration to play the tone |
StopTone()
Stops the tone playing
View Source
void StopTone()
SetVolume(float)
Set the playback volume
View Source
void SetVolume(float volume)
Parameters
Type | Name | Description |
---|---|---|
System.Single | volume | The volume from 0 (off) to 1 (max volume) |