You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't expect you to change anything, just wanted to document. Jo Engine doesn't appear to support setting the sample rate for PCM files. As per your comments in "demo - audio\main.c" the Saturn can support both 8000 and 44100 sample rates. However there does not appear to be a place to change the sample rates anywhere.
jo_audio_load_pcm() does not take a sample rate, the jo_sound struct does not contain the sample rate, and jo_audio_play_sound_on_channel() takes an index into the PCM _jo_internal_pcm[JO_SOUND_MAX_CHANNEL] array. This structure contains the sample rate (via some computation in pitch, see Ponut's code: https://github.com/ponut64/68k/blob/47e56ede2ee5bb4979ce85dffc5446ec44f81dd7/jo_demo/pcmsys.c#L207). The pitch doesn't appear to ever be set.
So here are the issues that should be considered:
What does a pitch of 0 mean? Since it isn't set, what sample rate it is?
Since the user cannot specify the sample rate it doesn't make sense to list multiple supported sample rates.
Maybe change the jo_audio_play_sound_on_channel() prototype to take a PCM* as an input. That way the user could specify everything.
Thanks as always.
The text was updated successfully, but these errors were encountered:
Hi Johannes,
I don't expect you to change anything, just wanted to document. Jo Engine doesn't appear to support setting the sample rate for PCM files. As per your comments in "demo - audio\main.c" the Saturn can support both 8000 and 44100 sample rates. However there does not appear to be a place to change the sample rates anywhere.
jo_audio_load_pcm() does not take a sample rate, the jo_sound struct does not contain the sample rate, and jo_audio_play_sound_on_channel() takes an index into the PCM _jo_internal_pcm[JO_SOUND_MAX_CHANNEL] array. This structure contains the sample rate (via some computation in pitch, see Ponut's code: https://github.com/ponut64/68k/blob/47e56ede2ee5bb4979ce85dffc5446ec44f81dd7/jo_demo/pcmsys.c#L207). The pitch doesn't appear to ever be set.
So here are the issues that should be considered:
Thanks as always.
The text was updated successfully, but these errors were encountered: