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

a proper branch for fixing issues of sceMp3 #5828

Closed
wants to merge 7 commits into from

Conversation

kaienfr
Copy link
Contributor

@kaienfr kaienfr commented Apr 10, 2014

  1. The voice speed issue (eg. "Hanayaka Nari Wa ga Ichizoku" Hanayaka Nari Wa ga Ichizoku strange MP3 mono voice #5213) should be ok.
  2. Downstream Panic is all right.
  3. Improve ffmpeg callback function to correctly control loops and buffer copies.

1. The voice speed issue (eg. "Hanayaka Nari Wa ga Ichizoku" hrydgard#5213) should be ok.
2. Downstream Panic is all right.
3. Improve ffmpeg callback function to correctly control loops and buffer copies.
kaienfr added a commit to kaienfr/ppsspp_cn that referenced this pull request Apr 10, 2014
Based on this commit hrydgard#5828 on improvements to sceMp3
Custom BGM can be update now. Test on "Miku" is just all right :)
@kaienfr kaienfr mentioned this pull request Apr 10, 2014
For some sound issue hacks. Currently, I add two hacks
1. Mp3 Sample Rate fixed to 44100Hz ( fixing fast voice issue)
2. Fix mp3 loop issues (fixing Miku custom mp3 playing issue, and lost last voice issue)
Provide some sound hacks seem necessary since we have many issues hard to fix and can not working both with previous settings simultaneously.
@kaienfr
Copy link
Contributor Author

kaienfr commented Apr 10, 2014

I add two sound hacks menu for providing some sound hacks, this seem necessary since we have many issues hard to be fixed and can not working both with previous settings simultaneously.
Currently I add two hacks:

  1. Mp3 Sample Rate fixed to 44100Hz ( fixing fast voice issue)
  2. Mp3 loop issues (fixing Miku custom mp3 playing issue, and lost last voice issue)

The setting UI is like this:
audiohack

}
__AdjustBGMVolume((s16 *)out, frame.nb_samples * frame.channels);
// always convert to stereo pcm
__AdjustBGMVolume((s16 *)out, frame->nb_samples * 2);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of just blindly multiplying by 2 it would make the code clearer to do this:

 int num_channels = 2;
 __AdjustBGMVolume((s16 *)out, frame->nb_samples * num_channels);

and later below

 bytespcm += ret * sizeof(s16) * num_channels;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will add this

@kaienfr
Copy link
Contributor Author

kaienfr commented Apr 10, 2014

Here it is.
PS: This branch is the follows of custom bgm branch, I just seperate it into two different case, but without this commit, custom mp3 audio can not playing in the current master sceMp3 code.

@kaienfr
Copy link
Contributor Author

kaienfr commented Apr 10, 2014

@hrydgard Please look at the above two commits and tell me do you agree such changes. It will only affect 48kHz 1152 sampleCount audios (no matter mono or stereo), such as mp3 and wma. Tests on Miku 48000 Hz mp3 and Hanayaka Nari Wa ga Ichizoku 32000Hz mp3 are both all right.

@hrydgard
Copy link
Owner

Hmmmm. We avoid two sample rate conversion at the cost of operating entirely unlike what the PSP is doing, which seems dangerous. I'll look at it some more but I don't think I like it...

@kaienfr
Copy link
Contributor Author

kaienfr commented Apr 11, 2014

I will close this one, since the universal audio branch seems much better #5839

@kaienfr kaienfr closed this Apr 11, 2014
@kaienfr kaienfr deleted the sceMp3_fix branch April 12, 2014 09:55
@kaienfr kaienfr mentioned this pull request Apr 12, 2014
@kaienfr kaienfr restored the sceMp3_fix branch April 13, 2014 12:43
@kaienfr kaienfr deleted the sceMp3_fix branch April 15, 2014 00:39
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

Successfully merging this pull request may close these issues.

4 participants