It shouldn't be passed to the callback because it is readonly (
https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/sampleRate
)

On Fri, Nov 22, 2024 at 5:24 PM Carl Woffenden <[email protected]> wrote:

> But how do I figure out what the audio sample rate is?
>
>
> It's a property of the audio worklet global scope, but you can also query
> it from the returned context, something like:
>
> emscriptenGetAudioObject(context).sampleRate
>
> I'm going to be proposing API changes so that it's passed to the callback
> (in a struct with other data).
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/emscripten-discuss/eae8d63f-c35c-4241-8cc7-376863d0fc6cn%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/eae8d63f-c35c-4241-8cc7-376863d0fc6cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/emscripten-discuss/CANLCay%3D3Kr0RJrMZyeW57H0ty%2Bz_K1NoZXSwKone7o9w56HzHg%40mail.gmail.com.

Reply via email to