-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b55a837
commit 1e0ba55
Showing
8 changed files
with
351 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package riff | ||
|
||
// Audio Definition Model | ||
// https://adm.ebu.io/background/what_is_the_adm.html | ||
// https://tech.ebu.ch/publications/tech3285s7 | ||
// https://tech.ebu.ch/publications/tech3285s5 | ||
|
||
import ( | ||
"github.com/wader/fq/pkg/decode" | ||
) | ||
|
||
func chnaDecode(d *decode.D, size int64) { | ||
d.FieldU16("num_tracks") | ||
d.FieldU16("num_uids") | ||
|
||
audioIdLen := (size - 4) / 40 | ||
d.FieldStructNArray("audio_ids", "audio_id", int64(audioIdLen), func(d *decode.D) { | ||
d.FieldU16("track_index") | ||
d.FieldUTF8("uid", 12) | ||
d.FieldUTF8("track_format_id_reference", 14) | ||
d.FieldUTF8("pack_format_id_reference", 11) | ||
// Skip padding single byte | ||
d.U8() | ||
}) | ||
} | ||
|
||
func axmlDecode(d *decode.D, size int64) { | ||
// fmt.Println("test axml") | ||
// TODO(jmarnell): this chunk is all variable xml, so leave as is? | ||
d.FieldRawLen("xml", size*8) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.