Lines Matching refs:format

43     this.format = null;
175 Asset.prototype.findDecoder = function(format) { argument
177 this.format = format;
181 this.emit('format', this.format);
182 decoder = Decoder.find(this.format.formatID);
184 return this.emit('error', "A decoder for " + this.format.formatID + " was not found.");
186 this.decoder = new decoder(this.demuxer, this.format);
187 if (this.format.floatingPoint) {
194 div = Math.pow(2, this.format.bitsPerChannel - 1);
1379 function Decoder(demuxer, format) { argument
1382 this.format = format;
1494 littleEndian = this.format.littleEndian;
1496 samples = chunkSize / (this.format.bitsPerChannel / 8) | 0;
1497 if (chunkSize < this.format.bitsPerChannel / 8) {
1500 if (this.format.floatingPoint) {
1501 switch (this.format.bitsPerChannel) {
1518 switch (this.format.bitsPerChannel) {
1589 this.format.bitsPerChannel = 16;
1591 if (this.format.formatID === 'ulaw') {
1719 if (this.format && this.format.framesPerPacket > 0 && this.format.bytesPerPacket > 0) {
1722 offset: this.format.bytesPerPacket * timestamp / this.format.framesPerPacket
1738 var e, format, offset, stream, _i, _len;
1741 format = formats[_i];
1744 if (format.probe(stream)) {
1745 return format;
1784 var buffer, format, offset, _ref;
1806 this.format = { class in AIFFDemuxer.readChunk
1816 … this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
1818 format = this.stream.readString(4);
1819 this.format.littleEndian = format === 'sowt' && this.format.bitsPerChannel > 8;
1820 this.format.floatingPoint = format === 'fl32' || format === 'fl64';
1821 …if (format === 'twos' || format === 'sowt' || format === 'fl32' || format === 'fl64' || format ===…
1822 format = 'lpcm';
1824 this.format.formatID = format;
1828 this.emit('format', this.format);
1829 this.emit('duration', this.format.sampleCount / this.format.sampleRate * 1000 | 0);
1900 this.format = { class in AUDemuxer.readChunk
1909 if (this.format.bitsPerChannel == null) {
1912 this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
1914 bytes = this.format.bitsPerChannel / 8;
1915 …this.emit('duration', dataSize / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1…
1917 this.emit('format', this.format);
1956 if (!this.format && this.stream.available(64)) {
1967 this.format = {};
1968 this.format.sampleRate = this.stream.readFloat64();
1969 this.format.formatID = this.stream.readString(4);
1971 if (this.format.formatID === 'lpcm') {
1972 this.format.floatingPoint = Boolean(flags & 1);
1973 this.format.littleEndian = Boolean(flags & 2);
1975 this.format.bytesPerPacket = this.stream.readUInt32();
1976 this.format.framesPerPacket = this.stream.readUInt32();
1977 this.format.channelsPerFrame = this.stream.readUInt32();
1978 this.format.bitsPerChannel = this.stream.readUInt32();
1979 this.emit('format', this.format);
1995 if (this.format.formatID === 'aac ') {
2020 this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0);
2026 byteOffset += this.format.bytesPerPacket || M4ADemuxer.readDescrLen(this.stream);
2027 sampleOffset += this.format.framesPerPacket || M4ADemuxer.readDescrLen(this.stream);
2047 if (this.format.bytesPerPacket !== 0 && !this.sentDuration) {
2048 this.numFrames = this.headerCache.size / this.format.bytesPerPacket;
2049 this.emit('duration', this.numFrames / this.format.sampleRate * 1000 | 0);
2226 var format, numEntries, version, _ref, _ref1;
2236 format = this.track.format = {};
2237 format.formatID = this.stream.readString(4);
2242 format.channelsPerFrame = this.stream.readUInt16();
2243 format.bitsPerChannel = this.stream.readUInt16();
2245 format.sampleRate = this.stream.readUInt16();
2248 format.framesPerPacket = this.stream.readUInt32();
2250 format.bytesPerFrame = this.stream.readUInt32();
2255 if (BITS_PER_CHANNEL[format.formatID] != null) {
2256 format.bitsPerChannel = BITS_PER_CHANNEL[format.formatID];
2258 format.floatingPoint = (_ref = format.formatID) === 'fl32' || _ref === 'fl64';
2259 format.littleEndian = format.formatID === 'sowt' && format.bitsPerChannel > 8;
2260 …if ((_ref1 = format.formatID) === 'twos' || _ref1 === 'sowt' || _ref1 === 'in24' || _ref1 === 'in3…
2261 return format.formatID = 'lpcm';
2278 return this.track.format.littleEndian = !!this.stream.readUInt16();
2454 this.emit('format', this.track.format);
2757 this.format = { class in WAVEDemuxer.readChunk
2767 this.format.bitsPerChannel = this.stream.readUInt16(true);
2768 … this.format.bytesPerPacket = (this.format.bitsPerChannel / 8) * this.format.channelsPerFrame;
2769 this.emit('format', this.format);
2774 bytes = this.format.bitsPerChannel / 8;
2775 …this.emit('duration', this.len / bytes / this.format.channelsPerFrame / this.format.sampleRate * 1…
3419 return function(format) { argument
3420 _this.format = format;
3421 return _this.emit('format', _this.format);
3515 timestamp = (timestamp / 1000) * this.format.sampleRate;
3517 this.currentTime = timestamp / this.format.sampleRate * 1000 | 0;
3526 this.device = new AudioDevice(this.format.sampleRate, this.format.channelsPerFrame);