EmuNewz Network
Audio sampling rate setting - Printable Version

+- EmuNewz Network (https://www.emunewz.net/forum)
+-- Forum: PSP Emulation (https://www.emunewz.net/forum/forumdisplay.php?fid=191)
+--- Forum: JPCSP Official Forum (https://www.emunewz.net/forum/forumdisplay.php?fid=51)
+---- Forum: svn trunk discussion (https://www.emunewz.net/forum/forumdisplay.php?fid=56)
+---- Thread: Audio sampling rate setting (/showthread.php?tid=3392)



Audio sampling rate setting - Itaru - 01-17-2011

A little background: When I first tried Persona 3 Portable on Jpcsp a while back, I felt that the voice audio seemed to play slightly faster and higher-pitched than I remember it. I brushed it off back then since I was impressed that a PSP emulator written in Java can actually play games well. Also when I tried Hatsune Miku Project DIVA 2nd on the emulator, the visuals always lag behind the music even though I felt that the framerate runs pretty smoothly. I thought it was a problem with the emulated graphics engine not being able to keep up with the audio, but then after performing the methodMaxInstructions tests on several games, it occured to me that perhaps Jpcsp is playing the audio too fast.

So, I looked through the source code and found that the DEFAULT_SAMPLE_RATE is set to 48000. I lowered it to 44100 and voila, the visual and music in Project Diva 2nd are perfectly synchronized. Project Diva 2nd is now running perfectly on my system at full speed. Cool Also, the voice audio in Persona 3 Portable is also playing at the correct speed and pitch as I remember it.

Unfortunately, since I've gotten used to the slightly faster and higher pitched audio due to "testing" Jpcsp for several weeks now, I now get the feeling that the audio is a bit too slow and low-pitched at 44100. Tongue

Therefore, my suggestion is to add a user-selectable audio sampling rate in Jpcsp so that users can choose between 44100Hz or 48000Hz. Frankly I prefer the 48000Hz sampling rate except for Project Diva 2nd which needs 44100Hz to run correctly in sync.


RE: Audio sampling rate setting - gid15 - 01-18-2011

(01-17-2011, 01:55 PM)Itaru Wrote: A little background: When I first tried Persona 3 Portable on Jpcsp a while back, I felt that the voice audio seemed to play slightly faster and higher-pitched than I remember it. I brushed it off back then since I was impressed that a PSP emulator written in Java can actually play games well. Also when I tried Hatsune Miku Project DIVA 2nd on the emulator, the visuals always lag behind the music even though I felt that the framerate runs pretty smoothly. I thought it was a problem with the emulated graphics engine not being able to keep up with the audio, but then after performing the methodMaxInstructions tests on several games, it occured to me that perhaps Jpcsp is playing the audio too fast.

So, I looked through the source code and found that the DEFAULT_SAMPLE_RATE is set to 48000. I lowered it to 44100 and voila, the visual and music in Project Diva 2nd are perfectly synchronized. Project Diva 2nd is now running perfectly on my system at full speed. Cool Also, the voice audio in Persona 3 Portable is also playing at the correct speed and pitch as I remember it.

Unfortunately, since I've gotten used to the slightly faster and higher pitched audio due to "testing" Jpcsp for several weeks now, I now get the feeling that the audio is a bit too slow and low-pitched at 44100. Tongue

Therefore, my suggestion is to add a user-selectable audio sampling rate in Jpcsp so that users can choose between 44100Hz or 48000Hz. Frankly I prefer the 48000Hz sampling rate except for Project Diva 2nd which needs 44100Hz to run correctly in sync.
Now fixed in r1954. Thanks for tracking this down! Smile