Commit graph

349 commits

Author SHA1 Message Date
latot
e82620c572 remove
remove
2016-01-16 09:32:39 -03:00
latot
53ac6d98d8 Little things
back 1

other little change, join 2 in 1
2016-01-09 20:44:02 -03:00
Unknown W. Brackets
4fac4d364e Atrac: Read non-streamed data from PSP RAM.
This should fix games that don't actually read into the RAM right away,
which is probably "incorrect" but works on the PSP, should should work in
PPSSPP.
2016-01-02 13:20:17 -08:00
Unknown W. Brackets
f0551b4591 Atrac: Add a flag to use PSP RAM (not yet used.) 2016-01-02 13:20:17 -08:00
Unknown W. Brackets
d0c7cc85de Atrac: Update writableBytes/offset on adding data.
It should go in these places, even if GetStreamDataInfo is not called.
2016-01-02 13:20:16 -08:00
Unknown W. Brackets
2df6d7700e Atrac: Refactor out some common validation.
This seems to be happening a lot.
2016-01-02 13:20:15 -08:00
Unknown W. Brackets
1b6dbd45e7 Atrac: Get stream info right for half/full buffers.
Improve it a bit for streamed buffers, but it's still not quite right.
2016-01-02 13:20:15 -08:00
Unknown W. Brackets
e60dc24d29 Atrac: Update some comments/docs on buffers. 2016-01-02 13:20:14 -08:00
Unknown W. Brackets
959015f823 Atrac: Correct typo. 2016-01-02 13:16:22 -08:00
Unknown W. Brackets
96d5e10549 Atrac: Seek ahead only one frame at end.
If it had a partial ending frame, it should go ahead one frame, not one
frame plus the partial ending.
2016-01-02 11:13:48 -08:00
Unknown W. Brackets
85ff5eb68a Atrac: Adjust reads a bit earlier when skipping.
The frames we initially get may not start at 0, depending on how many
frames we're skipping.  Of course...
2016-01-02 11:13:09 -08:00
Unknown W. Brackets
6fe5fe07a4 Atrac: Revert broken seeking fix.
This wasn't the right solution to getting the right packets.
2016-01-02 11:12:35 -08:00
Unknown W. Brackets
182d281750 Atrac: Move currentSample on finish.
This seems to be what happens, and allows remaining frames to calculate
properly in some cases where it wasn't before.
2016-01-01 11:34:56 -08:00
Unknown W. Brackets
f88a82e0a6 Atrac: Respect null output even in fail workaround. 2016-01-01 11:34:33 -08:00
Unknown W. Brackets
dafb15d96e Atrac: Clamp packets to valid data.
In case we don't have full valid data yet, return only the part of the
data that is valid.  This allows FFmpeg to decode data it already has, as
necessary.
2016-01-01 11:33:48 -08:00
Unknown W. Brackets
cdca0492a4 Atrac: Update fileoffset handling per tests.
This accounts for the extra offset value.
2016-01-01 11:33:19 -08:00
Unknown W. Brackets
55e450fb1e Atrac: Fix a typo in loop handling. 2016-01-01 10:41:21 -08:00
Unknown W. Brackets
2eb960a3ce Atrac: remove double-read. 2016-01-01 10:24:52 -08:00
Unknown W. Brackets
448e18fba9 Atrac: Backfill buffer when seeking anywhere.
This corrects the output of sample data when seeking to arbitrary
locations.  Otherwise, it's off for a frame or two.
2016-01-01 10:24:18 -08:00
Yoshi Sugawara
746ccfc215 changed order of freeing codex context pointer for older versions of ffmpeg 2015-12-29 13:30:15 -05:00
Yoshi Sugawara
08cc02d11e removed spacing around pCodecCtx conditional check, added else clause to log that it was NULL when it was not expected to be 2015-12-29 10:54:43 -05:00
Yoshi Sugawara
4d2313ed9f fixed indenting from soft spaces to hard tabs 2015-12-29 04:23:41 -05:00
Yoshi Sugawara
73c04e59fa [iOS]: prevent crashing (EXC_BAD_ACCESS) when releasing FFMPEG context by adding NULL check on codec context pointer 2015-12-28 21:43:11 -05:00
Unknown W. Brackets
103b959d50 Fix a type comparison warning. 2015-12-23 15:22:13 -08:00
Henrik Rydgård
99b7741b96 Merge pull request #8194 from unknownbrackets/atrac-remaining
Atrac: Correct outputs of sceAtracGetSoundSample()
2015-11-09 18:46:46 +01:00
Unknown W. Brackets
c1d59f263a Atrac: Ignore the loopNum value for SAS streams.
It seems like this is ignored, and games overwrite it with the voice
number and expect it not to change.
2015-11-09 08:23:45 -08:00
Unknown W. Brackets
21fd209f0e Atrac: Correct outputs of sceAtracGetSoundSample().
Without these being correct (especially without loopEnd vs. endSample
being correct), Toukiden Kiwami doesn't play background music.
2015-11-08 19:55:28 -08:00
Unknown W. Brackets
a3f7598020 Atrac: Use fileoffset for curOff context value.
This doesn't match my tests so far, but Sol Trigger works correctly this
way.  Since this value is primarily only used for SAS, changing it back
for now until more thoroughly testing SAS makes sense.
2015-11-08 12:24:30 -08:00
Unknown W. Brackets
ac524eee1b Atrac: Also read loop count from context RAM.
Observed the Sol Trigger demo's library writing values here, although in
the cases I saw it wasn't changing it from 0.
2015-11-08 12:22:12 -08:00
Unknown W. Brackets
a0604c6de3 Atrac: DRY a tiny bit of the code down. 2015-11-08 09:04:11 -08:00
Unknown W. Brackets
28a957694a Atrac: Apply second FACT as loop offset.
It seems like, when these values are different, the difference indicates
some kind of delta in other sample values?

Mostly trying to match values coming out of firmware structs here.

Fixes music looping in Kurohyo 2.
2015-11-08 08:26:41 -08:00
Unknown W. Brackets
27043b5fa5 Atrac: Do not output remain on ending decode.
It's not supposed to output 0, or -1, or anything.  It leaves the original
value in place.  This is probably why some games "liked" different values.
2015-11-08 08:20:09 -08:00
Unknown W. Brackets
9da62c1efc Atrac: Use end codes for remaining when streaming. 2015-11-07 23:30:09 -08:00
Unknown W. Brackets
959887d407 Atrac: Correct remaining frames return value.
Streaming buffers still not correct in some cases, primarily looping.
2015-11-07 23:30:09 -08:00
Unknown W. Brackets
e28fa3c426 Atrac: Correct transition to fully loaded.
Normally it won't go over of course, oops.
2015-11-07 23:30:05 -08:00
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