AudioPcmDecodeSession
此内容尚不支持你的语言。
Defined in: media/src/mediabunny-adapter.ts:589
Reuses one Input and AudioSampleSink across sequential PCM fills.
Playback used to construct a new 8 MiB CustomSource and container parser on every ~85 ms mix. After a few dozen seconds the leftover caches and decoder wrappers made preview hitch. Callers still get a fresh decoder per range (mediabunny’s samples() API), so pair this with a short PCM window cache.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AudioPcmDecodeSession(
reader,options):AudioPcmDecodeSession
Defined in: media/src/mediabunny-adapter.ts:599
Parameters
Section titled “Parameters”reader
Section titled “reader”options
Section titled “options”AudioPcmDecodeSessionOptions = {}
Returns
Section titled “Returns”AudioPcmDecodeSession
Accessors
Section titled “Accessors”disposed
Section titled “disposed”Get Signature
Section titled “Get Signature”get disposed():
boolean
Defined in: media/src/mediabunny-adapter.ts:607
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: media/src/mediabunny-adapter.ts:626
Returns
Section titled “Returns”void
pcmRange()
Section titled “pcmRange()”pcmRange(
startUs,durationUs,signal?):Promise<AudioPcmBlock>
Defined in: media/src/mediabunny-adapter.ts:611
Parameters
Section titled “Parameters”startUs
Section titled “startUs”number
durationUs
Section titled “durationUs”number
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<AudioPcmBlock>