Author Topic: How to properly convert WAV to PCM?  (Read 1625 times)

kentosama

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
How to properly convert WAV to PCM?
« on: August 25, 2020, 11:53:57 am »
Hello, I would like some clarification on converting WAV to PCM.

To convert a WAV I use this command:
Code: [Select]
ffmpeg -i title.wav -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM

Checking if the PCM is correct I use this command:
Code: [Select]
ffplay -f s16be -ar 8000 -ac 1 ../../cd/TITLE.PCM

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 !

ponut64

  • Full Member
  • ***
  • Posts: 220
  • Karma: +22/-1
    • View Profile
Re: How to properly convert WAV to PCM?
« Reply #1 on: September 03, 2020, 01:17:28 pm »
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). https://discord.gg/sPruUm

You can also check out emerald nova game's tutorials and archived streams on youtube. https://emeraldnova.com/index.php

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.

 

Sitemap 1 2 3 4 5 6 7 8 9 10