Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCM - audio demo project - pcm audio playback (A.PCM) sample rate/pitch issue #80

Open
daniel-abbott opened this issue Oct 6, 2024 · 1 comment

Comments

@daniel-abbott
Copy link

I've been compiling the engine + demos on a Linux x86_64 machine (pop_os), no issues encountered on any up until the audio demo...

When running the audio demo in Yabause v0.914 the "blop sound" - A.PCM - will play as expected (both with HLE and real BIOS), however in other emulators such as Beetle Saturn or Kronos libretro core, the PCM audio playback is pitched quite dramatically down, playing at the files actual sample rate of 32000Hz rather than being automagically pitched up correctly for the actual 44100Hz Saturn audio output.

  • Also, when converting this (or any other) audio file to play natively at 44100Hz and updating the files sample_rate in code accordingly, the PCM audio output becomes extremely choppy.
  • CD audio is not affected in any way.

Mostly I'm wondering if this is a "just me" issue or if it can be reproduced on a non-Linux machine, and what steps could be taken to solve, thanks!

@daniel-abbott daniel-abbott changed the title PCM - audio demo project - pcm audio playback (A.PCM) PCM - audio demo project - pcm audio playback (A.PCM) sample rate/pitch issue Oct 6, 2024
@daniel-abbott
Copy link
Author

Well, I've been able to hack around this for now by just changing line 137 of audio.c to read as __jo_internal_pcm[(int)channel].pitch = (Uint16)sound->sample_rate * 2; - this appears to solve the problem in Beetle and Kronos, and seems to (mostly) run correctly in Yabause as well, though I'm looking to abandon it due to the lack of .cue support.

I don't think this is the "correct" solution, however it seems to be a good enough one for the moment, I'll have to read up on internals more to understand why this is happening and time is never on my side...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant