VolumeMonitor
final class VolumeMonitor
Monitor volume setting on device and the “silence” or “mute” switch. When there is no apparent audio output, update the Keyboard and NotePlayer instances so that they can show an indication to the user.
-
Set to true if there is a valid preset installed and in use by the sampler.
Declaration
Swift
public var activePreset: Bool
-
Construct new monitor.
Declaration
Swift
init(keyboard: Keyboard?)
Parameters
keyboard
Keyboard instance that handle key renderings
-
Begin monitoring volume of the given AVAudioSession
Declaration
Swift
func start()
Parameters
session
the AVAudioSession to monitor
-
Stop monitoring the output volume of an AVAudioSession
Declaration
Swift
func stop()
-
Show any previously-posted silence reason.
Declaration
Swift
func repostNotice()