mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 22:03:49 +02:00
Add toDataView
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@ import {
|
||||
mapAsyncGenerator,
|
||||
promiseWithResolvers,
|
||||
toAsyncIterator,
|
||||
toDataView,
|
||||
validateAnyIterable,
|
||||
} from './misc';
|
||||
import { fromAlaw, fromUlaw } from './pcm';
|
||||
@@ -1015,7 +1016,7 @@ class PcmAudioDecoderWrapper extends DecoderWrapper<EncodedAudioSample, AudioDat
|
||||
}
|
||||
|
||||
decode(sample: EncodedAudioSample) {
|
||||
const inputView = new DataView(sample.data.buffer, sample.data.byteOffset, sample.byteLength);
|
||||
const inputView = toDataView(sample.data);
|
||||
|
||||
const numberOfFrames = sample.byteLength / this.decoderConfig.numberOfChannels / this.inputSampleSize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user