-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Universal audio branch #5839
Universal audio branch #5839
Conversation
Test on Fortix is all right. Savestate is also ok. I've tried a New and Easy way implement and it works well, I think it could be totally applicable to other audio modules as sceMp3 etc. Code your own way is really much easier to fix other bugs :)
…t messages in release mode.
Based on my implementation in sceAac hrydgard#5836 I've created a class AuCtx included in My SimpleAudioDec.cpp/.h which aims at providing a standard easy implementation to support all codecs in ffmpeg. Here, I also completely re-code sceMp3 file with this class to give an example how to use this class, and it has solved all mp3 issues I've observed in the current master. Tests on different freq and channels mp3 audios as: Miku custom BGM (48kHz, stereo), Hanayaka Nari Wa ga Ichizoku(32kHz, mono, a little fast but better than before now), downstreet panic (44.1kHz, stereo), and learn jp09(44.1kHz, stero) are just all right. Especially, I am very glad to see that Miku's Custom BGMs have no repetition issues in first tone any more and no longer stopped in the first second neither. :) We will come into a new age to fast support new audio formats from now on I hope :P
What's wrong with unix build tonight? it appears errors as:
I've nothing touched about that two files. Somebody seems forget including headers? @hrydgard |
I just fixed it. |
Ok, I will merge it :) thanks |
} | ||
}; | ||
|
||
u32 sceAuExit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this bunch of functions are not actual Sony sce* functions, I don't think we should name them like that.
Just call them "Exit", "Decode", "GetLoopNum" etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, no problem.
You say savestates are "all right", but I'm pretty confident this will break any past savestates. Hopefully not many people use games that use any of these features. An sceAu, as used by sceMpeg, doesn't seem at all related to an mp3 context, so I'm confused by your naming here. -[Unknown] |
Yes, this needs savestate conversion code that reads the old style mp3 state blocks into the new structure. |
I have changed all class functions from sceAu... to Au..., since they are class function, generally it could be not confused with other, but I've still changed them. No problem. |
Do we really think we need convert massive of old style mp3 into new? many many things have been changed. I am not sure if it is convertable...but I will try |
Well, I know of a couple games that use sceMp3 that worked to some degree, and I'm not sure if they will still work with this code, but they are all unpopular minis. -[Unknown] |
I've tested some of them, they all work. |
Doesn't Dead Or Alive Paradise use sceMp3? |
sceAtrac has all sorts of secondary buffer stuff, and iirc it seemed to be causing (minor) problems in at least 1 or 2 games that it wasn't implemented. I don't think pretending it works the same as sceMp3 would be a good idea. I don't have Dead or Alive, so I don't know. It's very possible. I guess old savestates would not work unless supported was added to this pull, then. -[Unknown] |
I've added a conversion, and now begin to do tests. |
…u... to Au... Tests on games are just ok.
Here it is. kaienfr@a769173 |
Till now, all games with mp3 issues I've tested are all right. I also post a test version on baidu, 9 hours past, I've not received any problem on this new one. Only many people confused that the master branch still can not playing bgm mp3 on Miku, and I had to explain to them since only part of codes is currently merged to master, and old sceMp3 does not work correctly while the new code is still waiting for mergeing... If it's possible, please check and merge this asap to solve mp3 playing issue. Thanks! For me, since every tests are all right, I don't think I will change anything here, so I am ready for merging now. |
There's somthing wrong there then. Audio that sounds on the wrong pitch/speed is a result of incorrect resampling/played back into incorrect sample rate. |
I will understand this as the reserved channels issue. |
We flag filesystems as being FAT32 instead of checking for "ms0:".
More elegant way of solving #5839 (d_private in sceIoDread)
Kamen Rider Chou Climax Heroes Custom BGM speed is slow,and get error here. MP3MAIN_BgmM E[ME]: HLE\sceMp3.cpp:481 UNIMPL sceMp3GetFrameNum(09fbf980) jpcsp trace
|
@daniel229 can you send a demo to me ? |
on baidu message |
download speed is very slow on baidu, could you please send one from google? thanks. |
Have sent you a google on baidu message,I compiled your latest commit, still get a slow speed. |
This method can automatically read audio information from file (as channels, sample rate etc) via ffmpeg, and create accurate ffmpeg's codec context. Especially used for unknown audio format but supported by ffmpeg.
Thanks, I get it. |
@daniel229 I have test it, still haven't found anything wrong, bgm and sound seems all right? nothing slow speed, can you explain your problem more specifically? or upload a save file please. |
@hrydgard can you merge this branch now? I don't think we need add some new features in this branch. It's already so much. It's better to create new commit if we get a new issue in future. |
support to merge |
OK. |
@kaienfr the custom BGM slow |
@hrydgard Thanks a lot. Now everyone can test and contribute on this now :) |
@daniel229 can you upload a savefile and explain how to get cunstom BGM, I've no idea on this game's menu... |
Yeah, found a second example need to take sound speed hack on :P |
yeah,I have not tried that hack before,with that the sound fine. |
Wondering DOA and this game have sound parameters similarity? |
Could be, I think such games ask for a pcm buffer of two frames for each to play. If we can find a way to know this information, we can definitly solve this problem without hacks. |
Based on my implementation in sceAac #5836
I've created a class AuCtx included in my SimpleAudioDec.cpp/.h which aims at providing a standard and easy implementation to support all codecs in ffmpeg for ppsspp.
Here, I also completely re-code sceMp3 file very fast in using this class and give you as an example to show how to use this class, and also very glad to see that it has almost solved all mp3 issues I've observed in the current master.
Tests on different freq and channels mp3 audios are all right:
Miku custom BGM (48kHz, stereo), Hanayaka Nari Wa ga Ichizoku(32kHz, mono, a little fast but better than before now), downstreet panic (44.1kHz, stereo), and learn jp09(44.1kHz, stero).
Especially, I am very glad to see that Miku's Custom BGMs have no repetition issues in the first tone any more, and no longer stopped in the first second neither :)
We could be coming into a new age of fast implementing new audio formats from now on I hope :D
PS: save/loadstate is also all right.