Skip to content

Commit

Permalink
Rename from KHR_audio to KHR_audio_emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronfranke committed Jan 18, 2024
1 parent a401d97 commit 34114e7
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The extension has been submitted and merged as an OMI vendor extension. Alternat
### Stage 5

### Graduated to Khronos Extension
- [KHR_audio](https://github.com/KhronosGroup/glTF/pull/2137)
- [KHR_audio_emitter](https://github.com/KhronosGroup/glTF/pull/2137)

### Archived Extensions

Expand Down Expand Up @@ -172,7 +172,7 @@ The extension has been submitted and merged as an OMI vendor extension. Alternat
<tr>
<td>
<a href="https://github.com/KhronosGroup/glTF/pull/2137">
KHR_audio
KHR_audio_emitter
</a>
</td>
<td>KHR</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# KHR_audio
# KHR_audio_emitter

## Contributors

Expand Down Expand Up @@ -29,7 +29,7 @@ Audio emitter objects may be added to 3D nodes for positional audio or to the sc
```json
{
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitters": [
{
"name": "Positional Emitter",
Expand Down Expand Up @@ -84,7 +84,7 @@ Audio emitter objects may be added to 3D nodes for positional audio or to the sc
{
"name": "Default Scene",
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitters": [1]
}
}
Expand All @@ -95,7 +95,7 @@ Audio emitter objects may be added to 3D nodes for positional audio or to the sc
"name": "Duck",
"translation": [1.0, 2.0, 3.0],
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitter": 0
}
}
Expand All @@ -106,7 +106,7 @@ Audio emitter objects may be added to 3D nodes for positional audio or to the sc

## glTF Schema Updates

This extension consists of three primary data structures: Audio Data, Audio Sources, and Audio Emitters. Data, sources and emitters are defined on an `KHR_audio` object added to the `extensions` object on the document root.
This extension consists of three primary data structures: Audio Data, Audio Sources, and Audio Emitters. Data, sources and emitters are defined on an `KHR_audio_emitter` object added to the `extensions` object on the document root.

The extension must be added to the file's `extensionsUsed` array and because it is optional, it does not need to be added to the `extensionsRequired` array.

Expand All @@ -118,12 +118,12 @@ The extension must be added to the file's `extensionsUsed` array and because it
"version": "2.0"
},
"extensionsUsed": [
"KHR_audio"
"KHR_audio_emitter"
],
"scenes": [...],
"nodes": [...],
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"audio": [...],
"sources": [...],
"emitters": [...]
Expand All @@ -138,7 +138,7 @@ Audio data objects define where audio data is located and what format the data i

When storing audio data in a buffer view, the `mimeType` field must be specified. The base specification supports `audio/mpeg` and `audio/wav` MIME types. These were chosen with consideration for the wide support for these types acrosss 3D engines and common use cases. Other supported audio formats may be added via extensions.

Note that in tools that process glTF files, but do not implement the KHR_audio extension, external files referenced via the `uri` field may not be properly copied to their final destination or baked into the final binary glTF file. In these cases, using the `bufferView` property may be a better choice assuming the referenced `bufferView` index is not changed by the tool. The `uri` field might be a better choice when you want to be able to quickly change the referenced audio asset.
Note that in tools that process glTF files, but do not implement the `KHR_audio_emitter` extension, external files referenced via the `uri` field may not be properly copied to their final destination or baked into the final binary glTF file. In these cases, using the `bufferView` property may be a better choice assuming the referenced `bufferView` index is not changed by the tool. The `uri` field might be a better choice when you want to be able to quickly change the referenced audio asset.

#### `bufferView`

Expand Down Expand Up @@ -279,7 +279,7 @@ Audio emitters of type `global` may be added to scenes using the following synta
"scenes": [
{
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitters": [1, 3]
}
}
Expand All @@ -295,7 +295,7 @@ Audio emitters of type `global` may be added to nodes using the following syntax
"nodes": [
{
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitter": 1
}
}
Expand All @@ -311,7 +311,7 @@ Audio emitters of type `positional` may be added to nodes using the following sy
"nodes": [
{
"extensions": {
"KHR_audio": {
"KHR_audio_emitter": {
"emitter": 0
}
}
Expand Down Expand Up @@ -354,7 +354,7 @@ Radians are used for angles matching glTF2.

### JSON Schema

[glTF.KHR_audio.schema.json](/extensions/2.0/KHR_audio/schema/glTF.KHR_audio.schema.json)
[glTF.KHR_audio_emitter.schema.json](/extensions/2.0/KHR_audio_emitter/schema/glTF.KHR_audio_emitter.schema.json)

## Known Implementations

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio Audio Data",
"title": "KHR_audio_emitter Audio Data",
"type": "object",
"description": "Audio data objects define where audio data is located and what format the data is in. The data is either accessed via a bufferView or uri. `mimeType` is required when `bufferView` is used.",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio Positional Audio Emitter",
"title": "KHR_audio_emitter Positional Audio Emitter",
"type": "object",
"description": "Positional audio emitter properties.",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio Audio Emitter",
"title": "KHR_audio_emitter Audio Emitter",
"type": "object",
"description": "Audio emitters define how audio sources are played back. Emitter properties are defined at the document level and are references by nodes. Audio may be played globally or positionally. Positional audio has further properties that define how audio volume scales with distance and angle.",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio glTF Document Extension",
"title": "KHR_audio_emitter glTF Document Extension",
"type": "object",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio glTF Node Extension",
"title": "KHR_audio_emitter glTF Node Extension",
"type": "object",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio glTF Scene Extension",
"title": "KHR_audio_emitter glTF Scene Extension",
"type": "object",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_audio Audio Source",
"title": "KHR_audio_emitter Audio Source",
"type": "object",
"description": "Audio sources reference audio data and define playback properties for it. Audio sources may be used by zero to many audio emitters.",
"allOf": [{ "$ref": "glTFProperty.schema.json" }],
Expand Down

0 comments on commit 34114e7

Please sign in to comment.