Commit Graph

336 Commits

Author SHA1 Message Date
kaienfr
d5fde0baee implement sceMp3GetFrameNum 2014-04-14 11:47:28 +02:00
kaienfr
7ef2678cc9 Update sceAac module in using universal audio context class (AuCtx) 2014-04-13 14:38:42 +02:00
kaienfr
e25bc6908a Fix nonsmooth sound issue and incomplete frame at the end of source and pcm buffers.
using a std::string to save the source buffer, and changing the loading strategy so as we will not get any incomplete frame.
2014-04-12 23:16:38 +02:00
kaienfr
d5c1d58506 Audio Speed Hack (fill pcm buffer)
Dead or alive will be better to using this hack, but some other games will be too fast.
So, it's optional.
2014-04-12 17:16:31 +02:00
kaienfr
b3a7568811 change the way in AuGetInfoToAddStreamData and AuNotifyAddStreamData.
readPos and available buffer is firstly updated in AuGetInfoToAddStreamData then notified in AuNotifyAddStreamData.
Since, some games as Dead and alive may not call NotifyAddStreamData after GetInfoToAddStreamData
2014-04-12 14:54:25 +02:00
kaienfr
a7691737b5 Transfer old mp3 savestate into new mode; Rename class functions sceAu... to Au...
Tests on games are just ok.
2014-04-12 02:12:25 +02:00
kaienfr
ee1d541c28 Update minor comments 2014-04-11 23:42:07 +02:00
kaienfr
3a12cf2ad7 Universal Audio Class
Based on my implementation in sceAac https://github.com/hrydgard/ppsspp/pull/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
2014-04-11 22:56:59 +02:00
kaienfr
c216b535ee Save current changes 2014-04-11 15:09:31 +02:00
Henrik Rydgård
f328cfe655 Merge pull request #5816 from raven02/patch-8
No need to init packet as 0
2014-04-09 15:01:00 +02:00
kaienfr
a576420547 Remove decode function of SimpleAudioDec and use its class method. 2014-04-08 01:09:28 +02:00
kaienfr
99cf2654b7 Merge remote-tracking branch 'origin/master' into pmp_video_branch 2014-04-07 19:36:57 +02:00
raven02
619039aed6 No need to init packet as {0} 2014-04-07 19:29:57 +08:00
raven02
3fb85dde8f ME : Init packet as {0} 2014-04-06 20:40:04 +08:00
Henrik Rydgård
c724a6c06a Merge pull request #5764 from kaienfr/cleanup
Cleanup SimpleAudioDec
2014-04-06 12:01:05 +02:00
kaienfr
04756b91e0 Do State PMP media, and some other updates to PMP media. 2014-04-04 23:01:25 +02:00
Unknown W. Brackets
91323ebe92 Clear m_sws_ctx when freeing it.
Oops.  May help #5781.
2014-04-01 21:25:03 -07:00
kaienfr
03898fd1e6 updates 2014-04-01 04:58:56 +02:00
kaienfr
17174d0d24 fix for AAC audio playing 2014-04-01 00:37:01 +02:00
kaienfr
c03e591ecd Cleanup SimpleAudioDec
and remove unused AudioCreate fonction, it can be down in the class constructor.
2014-04-01 00:33:46 +02:00
kaienfr
f5d4b7bcb4 PMP Video
Not ready for merge, only for discussion about the current stage.
The video frame seems been decoded into RGB24 by my decodePmpVideo function, and the dumped ppm output file have also something.
But in ppsspp, we can just see some nonsense noise on the screen, but already hear AAC audio :)
I still have no idea what's wrong. Can somebody help? Thanks!
2014-04-01 00:33:31 +02:00
Unknown W. Brackets
0ba0dba63d Correctly free a few FFmpeg resources. 2014-03-30 13:44:32 -07:00
Unknown W. Brackets
ea9a6c1b58 Fix leaks in sceMpeg demuxing. 2014-03-30 13:06:42 -07:00
kaienfr
a7e74c74a7 Cleanup SimpleAudioDec
and remove unused AudioCreate fonction, it can be down in the class constructor.
2014-03-29 19:38:14 +01:00
kaienfr
4de5e1b72f Update MediaEngine.cpp
auto s = p.Section("MediaEngine", 1, 3);

if (s >= 3){
		p.Do(m_audioType);
	}
	else{
		m_audioType = PSP_CODEC_AT3PLUS;
	}
2014-03-23 20:28:39 +01:00
kaienfr
0238258129 Update MediaEngine.cpp
Support both old and new savestate for mediaengin.cpp
2014-03-23 20:18:27 +01:00
kaienfr
88f6f0e4af Update MediaEngine.cpp
fix new feature in MediaEngine.cpp
2014-03-23 20:07:21 +01:00
kaienfr
b18252b2b5 Support audio playing (AT3, AT3+, Mp3, AAC) 2014-03-23 19:45:08 +01:00
Henrik Rydgard
c8e719e165 Inline ADSREnvelope::Step (thanks @unknownbrackets)
(Some compilers want it declared inline in the header too)
2014-03-22 09:31:09 +01:00
Unknown W. Brackets
d65af7353b Avoid some ChunkFile includes. 2014-03-15 11:32:57 -07:00
The Dax
285d192e83 Further fixes. 2014-03-15 10:17:03 -04:00
kaienfr
b2b6b09072 Mp3 Audio Support.
Now, we can play mp3 audio format. :)
2014-03-15 14:40:31 +01:00
lioncash
b9886942a7 Fix some vertical alignments in misc Core source files. 2014-03-03 11:16:53 -05:00
Unknown W. Brackets
c7437bbe8e Fix some minor warnings. 2014-03-03 00:08:32 -08:00
Unknown W. Brackets
2c40cd509a Avoid overwriting io thread results.
Just block until it's done so that things are synchronous.
2014-03-02 13:45:12 -08:00
Unknown W. Brackets
da1e4a80a6 Tone down sas raw output reporting, found a game.
Crimson Gem Saga apparently uses this mode.
2014-03-01 15:32:34 -08:00
Unknown W. Brackets
be79670efb Revert "Smooth SAS resampling when pitch != 0x1000."
This reverts commit 1efcebb121.
2014-02-23 08:48:49 -08:00
Unknown W. Brackets
c806ae0982 Revert "Optimize mixing samples at common pitches."
This reverts commit dd434cd7c5.

Conflicts:
	Core/HW/SasAudio.cpp
2014-02-23 08:48:30 -08:00
Unknown W. Brackets
97e8f36a9b Revert "Actually use the resample buffer."
This reverts commit dc5d17971c.
2014-02-23 08:46:33 -08:00
Unknown W. Brackets
d6f203db99 Revert "Reset resample hist on keyon, round up read."
This reverts commit 3edebbfba9.
2014-02-23 08:45:46 -08:00
Unknown W. Brackets
3edebbfba9 Reset resample hist on keyon, round up read.
If we have an uneven pitch, round up so that we get the next sample to
resample in.
2014-02-22 22:38:03 -08:00
Unknown W. Brackets
9cba543a4b sceSasCoreWithMix() returns an error in raw mode.
And does not reschedule, specifically.
2014-02-22 08:48:55 -08:00
Unknown W. Brackets
0939065333 Report the raw output mode to find examples.
I can't find any games actually leaving the output mode at 1.
2014-02-22 08:07:51 -08:00
Unknown W. Brackets
ff920f6af6 Fix sceSas outputMode = 1 (which is not mono.)
May fix games that played audio only on the left side, or something.
2014-02-22 07:52:18 -08:00
Henrik Rydgård
4e93573422 Merge pull request #5486 from raven02/patch-25
Use GE_CMODE instead of TPSM_PIXEL_STORAGE_MODE
2014-02-20 18:48:10 +07:00
Unknown W. Brackets
a1283644ab If never set, loop to the first vag block.
Not the second (0 = second.)
2014-02-19 01:03:11 -08:00
Unknown W. Brackets
a36f7bf267 Fill in predict_nr's above 5, fix clamping.
We weren't processing vag properly when it hit the edges.

The coefficients were found with testing about 384 samples.
2014-02-19 01:01:56 -08:00
Unknown W. Brackets
11df9dabf9 Add an extra delay to VAG keyon.
It seems to come in an extra sample late.  PCM doesn't.

This corrects timing for VAG samples so they match up exactly.  Really
minor, of course...
2014-02-18 23:32:37 -08:00
Unknown W. Brackets
dc5d17971c Actually use the resample buffer.
Fixes static in Final Fantasy Tactics music.
2014-02-17 23:23:44 -08:00
Unknown W. Brackets
93060e3aef Avoid some divisions, just in case. 2014-02-17 23:19:30 -08:00