Interface IToneGenerator
Audio tones generator that plays tones at a given frequency
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IToneGenerator
Methods
PlayTone(Frequency, TimeSpan)
Plays the tone with a specified frequency and duration
View Source
Declaration
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
Declaration
void StopTone()
SetVolume(float)
Set the playback volume
View Source
Declaration
void SetVolume(float volume)
Parameters
Type | Name | Description |
---|---|---|
System.Single | volume | The volume from 0 (off) to 1 (max volume) |