Sega Saturn Development > General Jo Engine Help

How to properly convert WAV to PCM?


Hello, I would like some clarification on converting WAV to PCM.

To convert a WAV I use this command:

--- Code: ---
ffmpeg -i title.wav -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM
--- End code ---

Checking if the PCM is correct I use this command:

--- Code: ---
ffplay -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM
--- End code ---

The sound is correct played in the terminal, however when I compile and run the program, the sound is always played very quickly. The only way to get a correct reading is to keep the original frequency which is 44100Hz.

Could you tell me what's wrong?

Thanks !

You are converting it correctly, the problem is inside the audio playback function.

I can't remember how exactly to change it inside Jo. You can join the segaXtreme discord, or the segaXtreme forum, and we can give you more direct assistance (though we will push you outside of jo engine to solve this problem).

You can also check out emerald nova game's tutorials and archived streams on youtube.

To be clear, the function you're looking to use is slPCMOn. That functions' arguments are pretty complicated and you will need to go through the SGL manuals for it.


[0] Message Index

Sitemap 1 2 3 4 5 6 7 8 9 10 
Go to full version