diff --git a/wavinfo/wave_axml_reader.py b/wavinfo/wave_axml_reader.py index 373de4d..40c765d 100644 --- a/wavinfo/wave_axml_reader.py +++ b/wavinfo/wave_axml_reader.py @@ -1,14 +1,54 @@ +""" +ADM Reader +""" + +from struct import unpack, unpack_from, calcsize +from dataclasses import dataclass + from lxml import etree as ET -from collections import namedtuple + +@dataclass +class ChannelEntry: + """ + A `chna` chunk table entry. + """ + + track_index: int + "Track index (indexed from 1)" + + uid: str + "audioTrackUID" + + track_ref: str + "audioTrackFormatID" + + pack_ref: str + "audioPackFormatID" -class WaveAxmlReader: +class WavAxmlReader: """ Reads XML data from an EBU ADM (Audio Definiton Model) WAV File. """ - def __init__(self, axml_data, ) -> None: - pass - + def __init__(self, axml_data: bytes, chna_data: bytes) -> None: + header_fmt = "