1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[309],{60309:(e,t,a)=>{a.r(t),a.d(t,{AmrParser:()=>p});var i=a(86663),r=a(74921),s=a(76522),n=a(14152);const o={len:1,get:(e,t)=>({frameType:(0,n.f5)(e,t,1,4)})},m=s("music-metadata:parser:AMR"),d=[12,13,15,17,19,20,26,31,5,0,0,0,0,0,0,0];class p extends i.s{async parse(){var e,t;if("#!AMR"!==await this.tokenizer.readToken(new r.AnsiStringType(5)))throw new Error("Invalid AMR file: invalid MAGIC number");this.metadata.setFormat("container","AMR"),this.metadata.setFormat("codec","AMR"),this.metadata.setFormat("sampleRate",8e3),this.metadata.setFormat("bitrate",64e3),this.metadata.setFormat("numberOfChannels",1);let a=0,i=0;const s=null!==(e=null===(t=this.tokenizer.fileInfo)||void 0===t?void 0:t.size)&&void 0!==e?e:Number.MAX_SAFE_INTEGER;if(this.options.duration){for(;this.tokenizer.position<s;){const e=await this.tokenizer.readToken(o),t=d[e.frameType];if(t>0){if(a+=t+1,a>s)break;await this.tokenizer.ignore(t),++i}else m("Found no-data frame, frame-type: ".concat(e.frameType,". Skipping"))}this.metadata.setFormat("duration",.02*i)}}}}}]); 2//# sourceMappingURL=309.06552861.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.