MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / formatIsPlanar

Function formatIsPlanar

src/audio_data.ts:367–377  ·  view source on GitHub ↗
(format: AudioSampleFormat)

Source from the content-addressed store, hash-verified

365};
366
367const formatIsPlanar = (format: AudioSampleFormat): boolean => {
368 switch (format) {
369 case 'u8-planar':
370 case 's16-planar':
371 case 's32-planar':
372 case 'f32-planar':
373 return true;
374 default:
375 return false;
376 }
377};
378
379const getReadFunction = (format: AudioSampleFormat): (view: DataView, offset: number) => number => {
380 switch (format) {

Callers 2

allocationSizeMethod · 0.85
copyToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected