Commit graph

464 commits

Author SHA1 Message Date
Unknown W. Brackets
61e530df91 Atrac: Check more buffer states in GetRemainFrame. 2015-11-07 23:30:04 -08:00
Unknown W. Brackets
a932b0858c Atrac: Make sure NO_DATA is always set.
This way we can move away from data_buf, which eventually we'll stop using
entirely, in preference for PSP RAM.
2015-11-07 23:29:59 -08:00
Unknown W. Brackets
3f3700cb45 Atrac: Allow games to update buffer state.
Because they can and do.  This primarily only happens with low level and
SAS streams, I think.
2015-11-07 23:29:59 -08:00
Unknown W. Brackets
91de8e46c1 Atrac: Fix an internal typo. 2015-11-07 23:29:58 -08:00
Unknown W. Brackets
26a81f5179 Atrac: Simplify USE_FFMPEG checks.
Maybe we should just remove the option, but this way the behavior is a lot
more similar.
2015-11-07 23:29:58 -08:00
Unknown W. Brackets
9ebc9f695e Atrac: Clean up logging in sceAtracGetRemainFrame. 2015-11-07 23:29:57 -08:00
Unknown W. Brackets
3afc86e9b8 Atrac: correct offsetting logic in resetting.
Probably not super important exactly, but got the numbers backwards when I
reduced the test data.  Oops.
2015-11-06 23:19:21 -08:00
Unknown W. Brackets
696cb6649e Atrac: Match PSP on reset of streaming data.
This attempts to match the sizes and positions requested by the PSP
firmware APIs.  The two functions have to match: if they don't, it will
start reading incorrect data.
2015-11-05 23:23:59 -08:00
Unknown W. Brackets
4511407506 Atrac: Add reschedule when resetting play pos.
This matches tests, although the actual delay is more variable.
2015-11-05 23:23:55 -08:00
Unknown W. Brackets
a2c4f7760a Atrac: Add range check when resetting play pos. 2015-11-05 23:23:50 -08:00
Unknown W. Brackets
91e5916f66 Atrac: Fix sample range check to match output.
It allows some negative values, actually.
2015-11-05 23:23:45 -08:00
Unknown W. Brackets
85fac290c9 Atrac: Calc NO DATA status when loading old state. 2015-10-25 18:00:13 -07:00
Unknown W. Brackets
2b58af3db5 Atrac: Handle loop samples more correctly.
They need to be offset same as currentSamples.  Starting to really think
it'd be better to offset currentSamples instead...
2015-10-25 17:04:27 -07:00
Unknown W. Brackets
278d6b3690 Atrac: Set 0 read offset when fully loaded. 2015-10-25 17:04:27 -07:00
Unknown W. Brackets
85a699912d Atrac: Correct streamed bytes field in context. 2015-10-25 17:04:26 -07:00
Unknown W. Brackets
5cc13c45f4 Atrac: Try to handle endSample more consistently.
Maybe we should offset currentSample by the firstSampleOffset instead?
2015-10-25 17:04:25 -07:00
Unknown W. Brackets
e51891e9cd Atrac: Keep track of PSP-like buffer status.
This isn't correct yet, but tracking this much fixes looping of certain
audio.
2015-10-25 17:04:25 -07:00
Unknown W. Brackets
7e05d0db4b Atrac: Correct decode data when there's an offset. 2015-10-25 17:04:24 -07:00
Unknown W. Brackets
e90f88a687 Atrac: Parse size and fact offset more correctly. 2015-10-25 17:04:24 -07:00
Unknown W. Brackets
2e5f8d687f Atrac: Validate loop end and return an error. 2015-10-25 17:04:23 -07:00
Unknown W. Brackets
9ea765a347 Atrac: Calculate total samples based on data chunk.
Not on the entire RIFF size, which will be (slightly) inflated.
2015-10-25 17:04:22 -07:00
Unknown W. Brackets
ac56eff31c Atrac: Parse the smpl chunk more correctly.
Returns the same errors as the PSP.
2015-10-25 17:04:22 -07:00
Unknown W. Brackets
596ecdc431 Atrac: Allow data to extend outside RIFF size.
This seems technically incorrect, but it's allowed on the PSP, possibly
intentionally due to data shipped truncated by accident?
2015-10-25 17:04:21 -07:00
Unknown W. Brackets
522a1743f4 Atrac: Return an error if there's no data chunk. 2015-10-25 17:04:20 -07:00
Unknown W. Brackets
f7fa0a06d4 Atrac: Reset the fileoffset only when adding data.
Otherwise, it's only a seek.  For example, a seek to 0, as commonly seen.
2015-10-24 10:37:14 -07:00
Unknown W. Brackets
23c27d61df Improve an error return value. 2015-10-18 13:02:05 -07:00
Unknown W. Brackets
d0a9813844 Account for uneven sized chunks by rounding up.
Chunks have an extra pad byte if the size is uneven.  This probably isn't
happening, but just to be safe.
2015-10-18 12:50:40 -07:00
Unknown W. Brackets
8fa843bbc3 Atrac: attempt to power through bad frames. 2015-10-17 16:20:27 -07:00
Unknown W. Brackets
d30508ac43 Buildfix for Symbian/Blackberry/etc. 2015-10-17 16:20:27 -07:00
Unknown W. Brackets
60378dd59d Atrac: Hack to make seeking in GTA work. 2015-10-17 16:20:26 -07:00
Unknown W. Brackets
7d32876610 Atrac: Cleanup FFmpeg context ptr management. 2015-10-17 16:20:25 -07:00
Unknown W. Brackets
b47458eabb Atrac: fix loading certain savestates.
Some worked with it that high, but others not.
2015-10-17 16:20:24 -07:00
Unknown W. Brackets
5177f16c8d Atrac: Use constants for the states, more clarity. 2015-10-17 16:20:23 -07:00
Unknown W. Brackets
310aa6ed47 Atrac: Remove avio helpers. 2015-10-17 16:20:22 -07:00
Unknown W. Brackets
6420b679d4 Atrac: Split out low-level packet handling.
So we don't have the hack in the other code at all.
2015-10-17 16:20:22 -07:00
Unknown W. Brackets
5174f7df69 Atrac: Read in the jointStereo flag for ATRAC3. 2015-10-17 16:20:21 -07:00
Unknown W. Brackets
27a10bc49f Atrac: Fix AA3 dataOff value.
Note: will still be wrong in savestates...
2015-10-17 16:20:20 -07:00
Unknown W. Brackets
7d0dd0b94a Atrac: Stop using avio/avformat entirely.
Probably breaks AA3 support at this point...
2015-10-17 16:20:20 -07:00
Unknown W. Brackets
2037977292 Revert compatibility flag for GTA Music Hack.
This reverts commit eb4ca0cf81.
2015-10-17 16:20:19 -07:00
Unknown W. Brackets
4e7c59daae Fix minor typo. 2015-10-12 22:14:14 -07:00
Unknown W. Brackets
679b64ef5a Atrac: calculate instead of using header value map.
These are knowable values, so there's no real benefit to a static table
except potentially error detection.
2015-10-12 22:10:35 -07:00
Henrik Rydgard
eb4ca0cf81 Add a compatibility flag to revert sceAtrac to before #6976. Makes audio work in GTA again.
Hopefully we will find a better fix in the future.

Also see issue #7863.
2015-09-27 11:51:46 +02:00
Henrik Rydgard
9937b41461 ARM64: Fix vi2uc and vi2us and enable them. 2015-07-11 16:46:11 +02:00
Unknown W. Brackets
ffe7ef1ee2 Avoid spurious warnings in sceAtrac.
Valkyrie Profile for example calls this, doesn't seem like 0 matters.
2015-04-12 10:35:53 -07:00
Henrik Rydgård
a269e118b3 Merge pull request #7658 from unknownbrackets/debugger
Make it easier to use memchecks in HLE
2015-04-06 17:03:14 +02:00
Unknown W. Brackets
2450724be2 Make Memory::Memcpy() execute memchecks directly.
This makes it easier to handle breakpoints in HLE.
2015-04-05 18:09:20 -07:00
Unknown W. Brackets
0fc64dc717 Return an error when the atrac stream is full. 2015-04-05 17:22:38 -07:00
Unknown W. Brackets
ae4811d0d1 Still fudge seek positions for low level.
Since in this case we're tricking it into reading the same buffer area.
2015-03-26 22:34:45 -07:00
Unknown W. Brackets
425eed7bea Keep separate track of ffmpeg pos and decode pos.
FFmpeg buffers, so forcing the pos only makes FFmpeg read in garbage
because it doesn't know that you seeked in the bytestream on it.
2015-03-26 20:23:37 -07:00
Henrik Rydgård
62e621f8a1 Merge pull request #6976 from unknownbrackets/atrac-minor
When seeking to atrac positions, force alignment and start from zero
2015-03-26 00:29:51 +01:00