Readonly, so you can read the value valid for that audio frame.

On Friday, November 22, 2024 at 6:28:00 PM UTC+1 [email protected] wrote:

> 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/94206caf-3c10-4cfd-aa59-c877ad1ef780n%40googlegroups.com.

Reply via email to