Commit Graph
61 Commits
Author SHA1 Message Date
Henrik Rydgård e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Unknown W. Brackets d45fe93588 Mp3: Output PCM data using even/odd buffer slot.
This makes sense since the audio APIs are all async.
2022-01-27 00:22:44 -08:00
Unknown W. Brackets 914d022eef Mp3: Allow decode with NULL out pointer. 2022-01-27 00:22:44 -08:00
Unknown W. Brackets 4903e14aae Mp3: Cleanup AuCtx constructor. 2022-01-27 00:22:43 -08:00
Henrik RydgårdandGitHub 2f3bc2d373 Merge pull request #14056 from unknownbrackets/debugger-mem
Track memory allocations and writes for debug info
2021-02-21 10:18:11 +01:00
Unknown W. Brackets b19e39efb0 Audiocodec: Update to latest FFmpeg packet pump. 2021-02-18 00:20:27 -08:00
Unknown W. Brackets 2362d71d70 Mpeg: Remove deprecated codec register calls. 2021-02-18 00:20:27 -08:00
Unknown W. Brackets f7740edc6d Debugger: Add more metadata for memory usage. 2021-02-15 15:01:21 -08:00
Unknown W. Brackets 463fc3c792 Mp3: Allow decode without pcm pointer.
Just like other audio decoding, you're allowed to skip audio.
Also prevents a crash if the mp3 is not yet inited.
2021-01-25 23:51:55 -08:00
sum2012 942ce775cc Fix AuCheckStreamDataNeeded function
fix #13633
2020-11-08 22:47:32 +08:00
Unknown W. Brackets b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets 4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Unknown W. Brackets 4ee5d2b611 Mp3: Correct seek to specific frame.
Before, it treated it as an (incomplete) seek to a byte position, which
didn't make much sense.  This matches PSP behavior per tests.
2019-04-29 04:47:59 -07:00
Unknown W. Brackets bfa9aa009d Mp3: Properly flush the buffer on reset. 2019-04-29 04:47:59 -07:00
Unknown W. Brackets 4b4c0f9bda Mp3: Always output data in decode, except at end.
Turns out this doesn't return 0 until the end, even if there's no data
available to decode.  It just writes zeros in that case.
2019-04-29 04:47:59 -07:00
Unknown W. Brackets fde59c955d Mp3: Use a vector for the temp buffer.
Hopefully will move to reading RAM directly.  I think this was not always
adding data properly, as I got wrong output after decode.  Makes more
sense as a vector, anyway.
2019-04-29 04:45:36 -07:00
Unknown W. Brackets ac43e55194 Mp3: Loop correctly from an offset.
If the offset points to an ID3 tag or the middle of a frame, that's fine -
it should just search forward to the next sync.  FFmpeg just returns a
decode error, so we do this first.
2019-04-28 08:35:35 -07:00
Unknown W. Brackets e4817b4e83 Mp3: Reset sum decoded on loop.
And only on loop, not when getting add info (which clearly doesn't loop,
from tests.)
2019-04-28 07:55:29 -07:00
Unknown W. Brackets a3640f303b Mp3: Correct sum decoded sample count.
It shouldn't consider both channels of stereo.  This could've been causing
some games to think they were playing audio at an incorrect speed.
2019-04-28 07:30:56 -07:00
Unknown W. Brackets bc1e6e12f5 Mp3: Return total frame count in sceMp3GetFrameNum.
This might fix games failing to play mp3s correctly.
2019-04-28 07:10:26 -07:00
Unknown W. BracketsandGitHub df9c922198 Merge pull request #10783 from LunaMoo/fillSoundBuffer
Remove "sound speed hack"
2019-04-28 06:20:13 -07:00
LunaMoo 0a4dc1f883 Remove "sound speed hack". 2019-04-25 04:15:31 +02:00
Unknown W. Brackets 0d6570e8ad Mp3: Correct sceMp3GetMaxOutputSample.
Was based on output buffer size, rather than frame size, before.

Fixes choppy audio in Velocity.
2019-04-24 14:31:12 -07:00
Unknown W. Brackets be6710ea4a Mp3: Fix errors for a bunch of init getters. 2019-04-24 14:13:46 -07:00
Unknown W. Brackets e4d2712897 Mp3: Apply offset to stream read buffer.
Handle errors for sceMp3CheckStreamDataNeeded as well.
2019-04-23 21:14:54 -07:00
Unknown W. Brackets f9863c3be2 Mp3: Align CheckStreamDataNeeded with InfoToAdd.
May cause problems if they don't match.
2019-04-23 20:42:13 -07:00
Unknown W. Brackets f1eaf9dc0e Mp3: Don't change buffer accounting until add.
If we just ask what we should add, that is meant to stay static until we
do actually add it.

This also reduces the max we ask for at a time, which better matches
correct behavior and might impact game behavior.
2019-04-23 20:18:16 -07:00
Henrik Rydgard fcbc20f240 Small changes to make Common and Core build under my preliminary UWP setup. 2017-02-24 18:59:41 +01:00
Unknown W. Brackets 266ee632e8 Cleanup FFmpeg funcs deprecated in 3.x. 2016-07-24 12:53:54 -07:00
Unknown W. Brackets 0b1102a622 Mpeg: Correctly handle mono audio in videos. 2016-01-21 23:19:03 -08:00
Unknown W. Brackets d30508ac43 Buildfix for Symbian/Blackberry/etc. 2015-10-17 16:20:27 -07:00
Unknown W. Brackets 0e8d3d9c56 Fix leak in FFmpeg codec ctx usage.
Turns out we were leaking these here too.
2015-10-17 16:20:25 -07:00
sergiobenrocha2 9dbd18e59d Ensure that it will use ffmpeg from ppsspp, not from the system. 2015-02-03 17:46:51 -02:00
Unknown W. Brackets daa90024ed Defer opening audio codec 'til we have block size.
May fix issues with newer versions of FFmpeg (#5772.)
2015-01-18 12:59:26 -08:00
Unknown W. Brackets 5c470a1923 Remove bgm and sfx volume settings.
They don't actually work in all games, and this only confuses users.

Also, the default 7 lowers the volume of audio detected as bgm or sfx, but
not other volume.  This means that some audio may have played too loud in
some games by default, which will be fixed by this change.
2014-08-17 14:16:59 -07:00
Sacha cd20288d99 Fix some compiler warnings. 2014-07-17 00:49:58 +10:00
Henrik Rydgard e444e21a8a Oops 2014-06-23 22:56:12 +02:00
Henrik Rydgard b4a9780b81 Typo fix 2014-06-23 22:51:22 +02:00
Henrik Rydgard 8e7570e8cd Improve some error messages 2014-06-23 21:42:31 +02:00
Unknown W. Brackets 47ad97617e Play AT3 files in background audio too.
Fixes 3rd Birthday and PQ2, at least.
2014-06-22 09:55:14 -07:00
Henrik Rydgard 8c36921d3c Have SimpleAudio respect channels/samplerate passed in 2014-06-22 18:33:09 +02:00
Henrik Rydgard dc66e18c00 Minor perf fix in SimpleAudio: Lazily create resampling contexts once instead of every audio frame 2014-06-22 17:50:47 +02:00
Henrik Rydgard cefc0bc96f Play the game's SND0.AT3 when a game is selected in the menu and on the "game screen". 2014-06-22 17:02:04 +02:00
Henrik Rydgard 12cef8fa80 Oops, buildfixes 2014-06-22 14:23:06 +02:00
Henrik Rydgard 1d0cc3417c Audio stuff: Cleanup, delete dead code 2014-06-22 14:01:23 +02:00
Unknown W. Brackets 95414d6727 Get rid of some duplicate code. 2014-05-29 08:30:00 -07:00
kaienfr c6a1b0e743 Provide a new method AuCtx::AuCreateCodecContextFromSource()
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.
2014-04-14 13:23:10 +02:00
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