Henrik Rydgård
942a76cfaa
Fix heap overflow via unsigned underflow in legacy Atrac::EnqueueForSas
...
The space-left clamp was computed in unsigned 32-bit arithmetic, so a
crafted fileoffset/FirstOffsetExtra could underflow to a huge value and
leave addbytes unclamped, driving a Memory::Memcpy past dataBuf_.
Compute the clamp in signed 64-bit, clamp negatives to 0, and skip the
copy when there's nothing to write.
2026-08-01 13:16:21 +02:00
Henrik Rydgård
4d7b51d8cb
Reimplement AA3 header parsing
2025-07-22 17:48:20 +02:00
Henrik Rydgård
5c77ff9147
Atrac: Rework the header dependencies
2025-06-25 11:34:07 +02:00
Henrik Rydgård
ea29fd284f
sceAtrac: Logging improvements, constification (and not)
2025-06-24 21:36:04 +02:00
Henrik Rydgård
43e79aba55
Give Mpeg and Atrac their own log categories
2025-06-24 21:36:04 +02:00
Henrik Rydgård
f7ff2e2d20
Remove redundant constants
2025-04-12 11:35:55 +02:00
Henrik Rydgård
870995a767
Mostly restore the old code path
2025-03-25 22:19:09 +01:00
Henrik Rydgård
172e54286e
Refactor a bit to make it easier to expose the streaming state to the debugger.
2025-03-25 22:01:33 +01:00
Henrik Rydgård
1bd5cffa1d
Initial work on re-implementing atrac-through-sas
2025-03-25 22:01:30 +01:00
Henrik Rydgård
0f840e6240
Move JPEG error codes to the big enum, some include cleanup
2025-03-21 20:44:46 +01:00
Henrik Rydgård
e70dd3b2df
Break out AtracTrack into its own file. Add a little atrac analysis tool to ImDebugger (for future use)
2025-03-19 16:15:51 +01:00
Henrik Rydgård
ec169e9fa9
Sol Trigger fix
2025-03-19 11:41:13 +01:00
Henrik Rydgård
c5ad1548bc
Add simple AT3 dumping (non-streaming only)
2025-03-19 10:42:32 +01:00
Henrik Rydgård
89a73be155
Compute the joint-stereo flag as needed instead of storing it.
2025-03-18 09:36:33 +01:00
Henrik Rydgård
01076d2a4f
InitLowLevel parameter cleanup
2025-03-18 09:36:33 +01:00
Henrik Rydgård
34c21ed271
track_ removal, part 2 - done!
2025-03-18 09:36:33 +01:00
Henrik Rydgård
02f06faad1
Atrac2 track_ removal, part 1
2025-03-18 09:36:33 +01:00
Henrik Rydgård
4379c1ad49
Rebase fixups
2025-03-18 09:36:33 +01:00
Henrik Rydgård
bb436cda8f
Reimplement a lot of logic, implement loop streaming properly
2025-03-18 09:36:33 +01:00
Henrik Rydgård
4d7a8b8233
Some type and comment cleanup
2025-03-18 09:36:33 +01:00
Henrik Rydgård
926a5623d1
Improve comments
2025-03-18 09:36:33 +01:00
Henrik Rydgård
92737be87e
Minor simplification
2025-03-18 09:36:33 +01:00
Henrik Rydgård
9623cd4897
Fix playback of fully loaded tracks, fix memory leak
2025-03-18 09:36:33 +01:00
Henrik Rydgård
9c02eab137
More work - start work on handling buffer wraparound properly. Passes the full test with 1 wraparound!
2025-03-18 09:36:32 +01:00
Henrik Rydgård
818e7a99bd
minor refactor
2025-03-17 11:02:59 +01:00
Henrik Rydgård
b7782d98f3
Prepare for Atrac context data to work the new way. Not actually active yet. Also restrict old versions to 4 contexts.
2025-03-16 19:32:03 +01:00
Henrik Rydgård
4fbdb58beb
Merge the "Analyze" function into SetData
2025-03-16 19:32:00 +01:00
Henrik Rydgård
3979b6af54
Combine the two Analyze functions
2025-03-16 12:59:32 +01:00
Henrik Rydgård
fe0edc0bda
One more cleanup before merging Analyze and SetData...
2025-03-16 12:44:16 +01:00
Henrik Rydgård
8ab41e387e
Reorganize to make the next step easier
2025-03-16 12:21:55 +01:00
Henrik Rydgård
bcf89754c7
First step: Split out the track analysis.
2025-03-16 12:21:55 +01:00
Henrik Rydgård
3d143a0cba
Finally get rid of the GetTrack() accessor
2025-03-16 11:29:00 +01:00
Henrik Rydgård
a3b43d8283
Refactor CurrentSample and ResetPlayPosition
2025-03-16 11:18:33 +01:00
Henrik Rydgård
fd9564166b
More GetTrack removal
2025-03-16 11:06:52 +01:00
Henrik Rydgård
b406f3a9d1
Move the GetSoundSample implementation behind the AtracBase interface
2025-03-16 09:48:13 +01:00
Henrik Rydgård
5bd1ae5bae
Move more validation logic into AtracBase
2025-03-16 09:48:13 +01:00
Henrik Rydgård
beaced1c87
Move loop status and reset info param validation in behind the AtracBase interface
2025-03-16 09:48:13 +01:00
Henrik Rydgård
9788a770a7
Add a DecodeLowLevel wrapper to the AtracBase interface
2025-03-16 09:47:36 +01:00
Henrik Rydgård
c33a86561f
Remove the strange "successCode" argument to SetData
2025-03-16 09:00:27 +01:00
Henrik Rydgård
89e031fb8a
Logging cleanup
2025-03-08 23:39:22 +01:00
Henrik Rydgård
812b22a224
Atrac: Forward-port comments from the other branches
2025-03-08 23:39:15 +01:00
sum2012
82a7864a5a
Fix Atrac codecParams
...
By DeepSeek R1
2025-03-07 22:44:35 +08:00
Henrik Rydgård
759726814c
Update Atrac::SetData
2025-03-05 17:02:46 +01:00
Henrik Rydgård
1678c141ba
Update Atrac->Analyze
2025-03-05 17:02:46 +01:00
Henrik Rydgård
d88487e7fd
Update AA3Analyze
2025-03-05 17:02:46 +01:00
Henrik Rydgård
70543c0363
Update AnalyzeTrack
2025-03-05 17:02:46 +01:00
Henrik Rydgård
7e3e944e3b
Update GetSecondBufferInfo
2025-03-05 17:02:46 +01:00
Henrik Rydgård
1553614756
Update sceAtracAddStreamData
2025-02-24 14:29:28 -06:00
Henrik Rydgård
e8f5009d36
Update SetSecondBuffer
2025-02-24 12:49:48 -06:00
Henrik Rydgård
5ac7b8b9ee
Rename the Atrac errors to match the pattern
2025-02-24 12:49:44 -06:00