Skip to main content

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​
TypeNameDescription
Meadow.Units.FrequencyfrequencyThe tone frequency
System.TimeSpandurationThe 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​
TypeNameDescription
System.SinglevolumeThe volume from 0 (off) to 1 (max volume)