foo-webview-sdk
    Preparing search index...

    Interface AudioSubscribeStreamParamsExperimental

    Parameters for audio.subscribeStream. Subscribe to live playback PCM audio. Audio chunks played by foobar2000 are copied into a shared memory ring buffer (one dedicated buffer per subscription). The buffer is delivered via a sharedbufferreceived event on chrome.webview alongside the first audio chunk. When sample rate or channel count changes, a new buffer is allocated (incrementing epoch) and audio:stream announces the previous epoch has ended. No chunks are delivered while playback is stopped or paused.

    interface AudioSubscribeStreamParams {
        bufferSeconds?: number;
        interval?: number;
        subscriptionId?: string;
    }
    Index
    bufferSeconds?: number

    Ring buffer length, in seconds. Reduced when the buffer would exceed 64 MiB.

    1
    
    interval?: number

    Callback interval to request from foobar2000, in seconds. The core rounds it to its own tick of about 16 ms and never goes above 200 ms; one subscription asking for a short interval shortens it for every stream subscription in the component. Defaults to the core's 200 ms.

    subscriptionId?: string

    Custom subscription ID; when omitted, the host generates one (pcmstream_N). Re-subscribing with an existing ID from the same page replaces the previous subscription.