hs.sound.getAudioEffectNames() -> table
hs.inspect(hs.audiounit.getAudioEffectNames())
hs.sound.soundFileTypes() -> table
hs.sound.soundTypes()
is far more valuablehs.sound.soundTypes() -> table
hs.sound.systemSounds() -> table
hs.sound.getByName()
hs.sound.getByFile(path) -> sound or nil
hs.sound
object from a filehs.sound
object or nil if the file could not be loadedhs.sound.getByName(name) -> sound or nil
hs.sound
object from a named soundhs.sound
object or nil if no matching sound could be foundhs.sound:currentTime([seekTime]) -> soundObject | seconds
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the current seek offset within an hs.sound
object. | | Parameters |hs.sound:device([deviceUID]) -> soundObject | UID string
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the playback device to use for an hs.sound
object | | Parameters |hs.audiodevice
object to use for playback of this sound. Use an explicit nil to use the system's default devicehs.audiodevice:uid()
hs.sound:duration() -> seconds
hs.sound
objecths.sound:isPlaying() -> bool
hs.sound
objecths.sound:loopSound([loop]) -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the looping behaviour of an hs.sound
object | | Parameters |hs.sound:name([soundName]) -> soundObject | name string
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the name of an hs.sound
object | | Parameters |nil
, the sound will automatically be set to stop when Hammerspoon is reloaded.hs.sound:pause() -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Pauses an hs.sound
object | | Parameters |hs.sound
object if the command was successful, otherwise false.hs.sound:play() -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Plays an hs.sound
object | | Parameters |hs.sound
object if the command was successful, otherwise false.hs.sound:resume() -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Resumes playing a paused hs.sound
object | | Parameters |hs.sound
object if the command was successful, otherwise false.hs.sound:setCallback(function) -> soundObject
hs.sound:stop
.hs.sound:stop() -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Stops playing an hs.sound
object | | Parameters |hs.sound
object if the command was successful, otherwise false.hs.sound:stopOnReload([stopOnReload]) -> soundObject | bool
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set whether a sound should be stopped when Hammerspoon reloads its configuration | | Parameters |hs.sound
object, see hs.sound:name()
hs.sound:volume([level]) -> soundObject | number
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or set the playback volume of an hs.sound
object | | Parameters |