Load/play/manipulate sound files
| Signature | hs.sound.getAudioEffectNames() -> table |
|---|---|
| Type | Function |
| Description | Gets a table of installed Audio Units Effect names. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 62 |
| Signature | hs.sound.soundFileTypes() -> table |
|---|---|
| Type | Function |
| Description | Gets the supported sound file types |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 200 |
| Signature | hs.sound.soundTypes() -> table |
|---|---|
| Type | Function |
| Description | Gets the supported UTI sound file formats |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 184 |
| Signature | hs.sound.systemSounds() -> table |
|---|---|
| Type | Function |
| Description | Gets a table of available system sounds |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 150 |
| Signature | hs.sound.getByFile(path) -> sound or nil |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 128 |
| Signature | hs.sound.getByName(name) -> sound or nil |
|---|---|
| Type | Constructor |
| Description | Creates an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 103 |
| Signature | hs.sound:currentTime([seekTime]) -> soundObject | seconds |
|---|---|
| Type | Method |
| Description | Get or set the current seek offset within an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 435 |
| Signature | hs.sound:device([deviceUID]) -> soundObject | UID string |
|---|---|
| Type | Method |
| Description | Get or set the playback device to use for an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 400 |
| Signature | hs.sound:duration() -> seconds |
|---|---|
| Type | Method |
| Description | Gets the length of an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 457 |
| Signature | hs.sound:isPlaying() -> bool |
|---|---|
| Type | Method |
| Description | Gets the current playback state of an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 496 |
| Signature | hs.sound:loopSound([loop]) -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Get or set the looping behaviour of an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 316 |
| Signature | hs.sound:name([soundName]) -> soundObject | name string |
|---|---|
| Type | Method |
| Description | Get or set the name of an |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 370 |
| Signature | hs.sound:pause() -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Pauses an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 253 |
| Signature | hs.sound:play() -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Plays an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 228 |
| Signature | hs.sound:resume() -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Resumes playing a paused |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 274 |
| Signature | hs.sound:setCallback(function) -> soundObject |
|---|---|
| Type | Method |
| Description | Set or remove the callback for receiving completion notification for the sound object. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 513 |
| Signature | hs.sound:stop() -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Stops playing an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 295 |
| Signature | hs.sound:stopOnReload([stopOnReload]) -> soundObject | bool |
|---|---|
| Type | Method |
| Description | Get or set whether a sound should be stopped when Hammerspoon reloads its configuration |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/sound/libsound.m line 341 |
| Signature | hs.sound:volume([level]) -> soundObject | number |
|---|---|
| Type | Method |
| Description | Get or set the playback volume of an |
| Parameters |
|
| Returns |
|
| Source | extensions/sound/libsound.m line 474 |