Sound handling
cinnabar:extension/sound-handling@0.1.0
Requested sound playback before it starts, for handle-sound.
Grants: audio to run handle-sound; this interface only defines handler types.
Types
position
World coordinates in blocks; absent for non-positional playback.
record position {
x: f32,
y: f32,
z: f32,
}
| Member | Type | Description |
|---|---|---|
x | f32 | |
y | f32 | |
z | f32 |
sound-context
One new playback request after event routing to an exact sound definition. Only
cancelled is changeable.
record sound-context {
name: string,
position: option<position>,
looping: bool,
cancelled: bool,
}
| Member | Type | Description |
|---|---|---|
name | string | Exact definition name, at most 128 UTF-8 bytes. |
position | option<position> | Requested world location; none is non-positional playback. |
looping | bool | Whether this request starts a repeating voice. |
cancelled | bool | Whether the request is discarded; false unless an earlier handler cancelled it. |
Types: position.
Functions
This interface defines shared types and has no functions.