Setting it creation time is only a suggestion, AFAIK, but reading this 
after creation should be good. You can read the same in the callback too, 
but the changes I'd like to make report this per callback.

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

> I wonder how reliable it would be to do this since it can change, for 
> example you could ask for a sampleRate and get less. What happens if it 
> changes during playback?
>
> As I see it it should be read from the callback
>
> On Friday, November 22, 2024 at 5:24:42 PM UTC+1 [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/35151143-1ec0-43d2-b479-679e764d7bf4n%40googlegroups.com.

Reply via email to