Skip to content

KHR_audio_emitter: channel rule, default listener, scale rule, Opus, loopCount, linear-model validation, playing pointer - #5

Open
rudybear wants to merge 1 commit into
omigroup:KHR_audiofrom
rudybear:KHR_audio_emitter-updates
Open

KHR_audio_emitter: channel rule, default listener, scale rule, Opus, loopCount, linear-model validation, playing pointer#5
rudybear wants to merge 1 commit into
omigroup:KHR_audiofrom
rudybear:KHR_audio_emitter-updates

Conversation

@rudybear

Copy link
Copy Markdown

Concrete spec text for the feedback posted on KhronosGroup#2137 (comment), offered as a PR into this branch so it flows into the upstream PR if accepted. Every change is implementation-tested (Web Audio reference runtime + WebGPU viewer + a playable demo asset; links in KhronosGroup#2561). README + 2 schema files; no restructuring.

  1. Channel behavior (normative) — positional emitters down-mix to mono per the Web Audio mixing rules; global emitters play channels as authored. Closes the 2022 mono/stereo thread; makes conformance testable.
  2. Default listener — one sentence: the listener is the active camera / viewer pose; extensions may override. (KHR_audio_environment builds on exactly this fallback.)
  3. Node scale rule — adopted from KHR_lights_punctual: scale does not affect gain or attenuation; distances are world-space. Would close Undefined behaviour of light (and audio) under viewer scale KhronosGroup/glTF#2162.
  4. Opus as a second base codecaudio/ogg (Ogg Opus, RFC 7845) alongside audio/mpeg. MP3 encoder padding makes gapless loops impossible (acknowledged in the upstream thread); loop-intended audio SHOULD use Opus. Schema updated.
  5. loopCount (integer, 0 = infinite) on sources — matches Omniverse and engine baseline. Schema updated.
  6. Linear-model validationdistanceModel: "linear" now requires explicit maxDistance > refDistance (the default maxDistance: 0 sentinel makes the linear formula divide by a negative).
  7. Runtime-only playing Object Model pointer — the smallest possible answer to the open event-driven-playback question: writing true (re)starts the source on every referencing emitter (rising edge restarts), false stops, read = is-playing. Not serialized; exists only through the Object Model for KHR_interactivity / KHR_animation_pointer. This single pointer is what makes a playable-instrument asset expressible today — working demo (drum kit, ~180 KB) linked from Proposal: Layered Audio Extension Architecture — KHR_audio_emitter + KHR_audio_graph + KHR_audio_environment KhronosGroup/glTF#2561. If the WG prefers dedicated interactivity audio nodes instead, this item can be dropped independently of the rest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GrRJ9hLK9L9HK5ZsJjNdw7

…odec, loopCount, linear-model validation, playing pointer

Implementation-informed changes from the layered-architecture work (KhronosGroup#2561), matching the review posted on KhronosGroup#2137:
- normative channel behavior: positional emitters down-mix to mono per Web Audio mixing rules; global emitters play channels as authored
- default listener defined (active camera / viewer pose; extensions may override)
- node-scale rule adopted from KHR_lights_punctual (scale does not affect gain/attenuation; distances are world-space)
- audio/ogg (Ogg Opus, RFC 7845) added as second base mimeType: MP3 cannot loop gaplessly, Opus can (+ multichannel)
- loopCount (0 = infinite) on sources
- linear distance model now requires explicit maxDistance > refDistance (default 0 sentinel divided by zero)
- runtime-only 'playing' Object Model pointer for event-driven playback via KHR_interactivity / KHR_animation_pointer (rising edge restarts, false stops; demonstrated in the playable drum-kit asset linked from KhronosGroup#2561)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant