play.Rd
play
plays audio
play(x, ...)
# S3 method for audioSample
play(x, rate, ...)
# S3 method for Sample
play(x, ...)
# S3 method for default
play(x, rate = 44100, ...)
data to play
sample rate - it is inferred from the object (where possible) if not specified
optional arguments passed to the method specific to the object being played
Returns an audio instance object which can be used to control the playback subsequently.
# \donttest{
play(sin(1:10000/20))
#> Error in play.default(sin(1:10000/20)): no audio drivers are available
# }