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

AI: Fix GameCube Sample Rate #6040

Merged
merged 1 commit into from
Oct 23, 2017
Merged

Conversation

JMC47
Copy link
Contributor

@JMC47 JMC47 commented Sep 8, 2017

The GameCube's sample rate is slightly different due to a hardware bug.
The exact numbers are (54000000 / 1124) for GameCube and (54000000 / 1125)
on Wii. I also modified 32KHz mode. This fixes audio desyncs in several
GameCube games and severe issues in Sonic Mega Collection.

TODO: Maybe not use an integer? That was beyond me to change though. Also this can probably be done better. I just wanted it available for testing. Seems to make Starfox Adventure's Dialogue line up better too, but, I'd like some more confirmation on that.

@leoetlino leoetlino added the RFC Request for comments label Sep 8, 2017
@degasus
Copy link
Member

degasus commented Sep 10, 2017

I'm for rewriting this stuff to return the number of cpu cycles for 8 audio samples. But this is a by far bigger change. So I think we should merge this code as it is for now.

@degasus degasus changed the title RFC - Fix GameCube Sample Rate AI: Fix GameCube Sample Rate Sep 10, 2017
@degasus degasus removed the RFC Request for comments label Sep 10, 2017
if (SConfig::GetInstance().bWii)
g_AIDSampleRate = tmpAICtrl.AIDFR ? 32000 : 48000;
else
g_AIDSampleRate = tmpAICtrl.AIDFR ? 32029 : 48043;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

The GameCube's sample rate is slightly different due to a hardware bug.
The exact numbers are (54000000 / 1124) for GameCube and (54000000 / 1125)
on Wii.  I also modified 32KHz mode.  This fixes audio desyncs in several
GameCube games and severe issues in Sonic Mega Collection.
@leoetlino leoetlino merged commit c6f40fa into dolphin-emu:master Oct 23, 2017
@Filoppi
Copy link
Contributor

Filoppi commented Jun 6, 2020

Hello. I was trying to improve the dolphin audio stretcher, but got caught up in much bigger and deeper stuff, which also involves this. Is there a way I could talk to you @JMC47 and @degasus ? E.g. Discord?

@JosJuice
Copy link
Member

JosJuice commented Jun 6, 2020

#dolphin-dev on irc.freenode.net would probably be the best place for that kind of discussion. Both JMC and degasus are there, along with most other devs.

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

Successfully merging this pull request may close these issues.

6 participants