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

Function configToCacheKey

src/audio_encoder.ts:47–54  ·  view source on GitHub ↗
(
	codecId: AVCodecID,
	sampleRate: number,
	numberOfChannels: number,
	bitrate: number | undefined,
)

Source from the content-addressed store, hash-verified

45
46const configSupportCache = new Map<string, boolean>();
47const configToCacheKey = (
48 codecId: AVCodecID,
49 sampleRate: number,
50 numberOfChannels: number,
51 bitrate: number | undefined,
52): string => {
53 return `${codecId}:${sampleRate}:${numberOfChannels}:${bitrate ?? 'default'}`;
54};
55
56/**
57 * Encodes audio frames into encoded chunks.

Callers 1

isConfigSupportedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected