Skip to content

Commit

Permalink
add Opus dOps box parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
cconcolato committed Mar 18, 2022
1 parent fd0ca94 commit 837f166
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/parsing/dOps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BoxParser.createBoxCtor("dOps", function(stream) {
this.Version = stream.readUint8();
this.OutputChannelCount = stream.readUint8();
this.PreSkip = stream.readUint16();
this.InputSampleRate = stream.readUint32();
this.OutputGain = stream.readInt16();
this.ChannelMappingFamily = stream.readUint8();
if (this.ChannelMappingFamily !== 0) {
this.StreamCount = stream.readUint8();
this.CoupledCount = stream.readUint8();
this.ChannelMapping = [];
for (var i = 0; i < this.OutputChannelCount; i++) {
this.ChannelMapping[i] = stream.readUint8();
}
}
});

0 comments on commit 837f166

Please sign in to comment.