Hello.
There are 2 flags that you can use in sv_init to set sample type used by SunVox lib: SV_INIT_FLAG_AUDIO_INT16 and SV_INIT_FLAG_AUDIO_FLOAT32. But what's default? I mean, what sample type is used if you pass 0 as flags variable? Sorry if it's in docs, couldn't find.
Default sample type in SunVox lib
-
- Posts: 5
- Joined: Mon Jan 04, 2021 7:40 pm
Re: Default sample type in SunVox lib
OK, from experiment it seems that default is int16_t. But is it really default or the library somehow decides which type to use?
- NightRadio
- Site Admin
- Posts: 3955
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Default sample type in SunVox lib
Hi!
If SV_INIT_FLAG_OFFLINE is set: the default is INT16.
If SV_INIT_FLAG_OFFLINE is not set: the default value is system-dependent; and the actual sample type may be different even if you specify it with SV_INIT_FLAG_USER_AUDIO_INT16/FLOAT32
If SV_INIT_FLAG_OFFLINE is set: the default is INT16.
If SV_INIT_FLAG_OFFLINE is not set: the default value is system-dependent; and the actual sample type may be different even if you specify it with SV_INIT_FLAG_USER_AUDIO_INT16/FLOAT32
-
- Posts: 5
- Joined: Mon Jan 04, 2021 7:40 pm
Re: Default sample type in SunVox lib
Thank you for the reply, was helpful!
A little bit off-topic question: can parts of SunVox lib documentation (explaining flags) be included in source of MIT-licensed binding of SunVox lib as comments? May seem a strange question, but stuff like that needs to be explicitly permitted (or not), I guess.
A little bit off-topic question: can parts of SunVox lib documentation (explaining flags) be included in source of MIT-licensed binding of SunVox lib as comments? May seem a strange question, but stuff like that needs to be explicitly permitted (or not), I guess.
- NightRadio
- Site Admin
- Posts: 3955
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Default sample type in SunVox lib
Of coursecan parts of SunVox lib documentation (explaining flags) be included in source of MIT-licensed binding of SunVox lib as comments?