smus.demuxer
DESCRIPTION
Reggae demuxer for IFF SMUS (Simple Musical Score) on MorphOS.
This demuxer validates FORM/SMUS and forwards each SMUS sub-chunk as a
length-prefixed packet stream to be consumed by smus.decoder.
Output framing (to be consumed by smus.decoder):
u32be packet_length
u8 packet_bytes[packet_length]
packet_bytes are the raw IFF chunk:
u8 chunk_id[4]
u32 chunk_size_be
u8 chunk_data[chunk_size]
Padding bytes (IFF even-size alignment) are skipped and never forwarded.
Additionally, this demuxer can *inject* external instrument resources
(Instruments/ *.instr and *.ss) into the same packet stream, before the
first TRAK chunk, so the decoder can use them without doing file I/O.
Injected chunks (pseudo-IFF):
'RINS' : instrument file bytes (*.instr)
'RSSS' : sample file bytes (*.ss)
'REND' : end of injected resources marker (size=0)
RINS/RSSS payload:
u8 name_len
u8 name[name_len] (e.g. "SnareDrum.instr")
u32be data_len
u8 data[data_len]
INTENDED CHAIN
source -> iff.smus.demuxer -> smus.decoder -> audio.output