241 Commits

Author SHA1 Message Date
Lioncash
4ccb838306 Core: Mark some module functions as static 2014-12-08 04:40:08 -05:00
Lioncash
f830d5dec7 Core: Mark some functions as const 2014-12-03 15:16:11 -05:00
Unknown W. Brackets
adef5bbe59 Discard packet data when seeking. 2014-10-03 23:23:36 -07:00
Unknown W. Brackets
50e4eded75 Actually use the temp packet. 2014-10-03 23:08:16 -07:00
Unknown W. Brackets
72e8e6448f Don't eat packet data when using a temp packet. 2014-10-03 22:17:25 -07:00
Unknown W. Brackets
cf7e280185 Attempt to ensure we don't decode partial frames. 2014-10-03 22:11:45 -07:00
Unknown W. Brackets
f421453bf9 Align samples even after a loop.
This corrects the amount of audio after certain loops, but it doesn't seem
to output the right data when this happens.

Possibly, seeking isn't doing the right thing and resetting state that
shouldn't be reset when a loop happens.  Not sure... but it was already
wrong before, this just reads the right amount of it.
2014-10-03 21:33:45 -07:00
Unknown W. Brackets
2f443f52a6 Ensure we request s16 samples.
We won't get these for atrac3+, but we should for atrac3 (seems to be the
default anyway, but better to be clear.)
2014-10-03 20:05:08 -07:00
Unknown W. Brackets
24ab84a0fe Centralize atrac frame decode logic. 2014-10-03 20:04:54 -07:00
Unknown W. Brackets
398646411a Properly handle atrac packets with multiple frames.
This gets us decoding the start of a file and near loops way more
correctly.
2014-10-03 19:48:39 -07:00
Unknown W. Brackets
1b520ea673 Correct first next sample calculation.
If it's exactly matching a frame size, we need to return a full frame,
rather than 0.  Fixes #6967.
2014-10-03 07:49:35 -07:00
Unknown W. Brackets
2221951cd9 Correct atrac looping offset by one frame. 2014-09-28 15:19:30 -07:00
Unknown W. Brackets
3856a53503 Handle atrac files with larger "fact" chunks.
Ends up with the a separate offset for loops, it seems like.  This corrects
looping information for these files.
2014-09-28 15:19:29 -07:00
Unknown W. Brackets
58afdfac60 Return an error for MOut on a stereo stream.
It seems like it won't downmix, it returns an error.
2014-09-28 15:19:29 -07:00
Unknown W. Brackets
c88b66b308 d3d9: Emulate some logic ops with blending.
This makes Brave Story's intro visible.  Also add for GLES2/GLES3, but
doesn't seem to work on GLES2.
2014-09-23 21:13:47 -07:00
Unknown W. Brackets
0ebe5325d4 Correct the end from sceAtracGetSoundSample().
I think it's meant to be the last *valid* sample.
2014-09-23 11:33:21 -07:00
Unknown W. Brackets
e717a87f9f Add extra frames if we run out of atrac data.
We could probably insert frames instead for GHA phase shifting, but this
will solve other bugs too, I think.
2014-09-23 11:33:21 -07:00
Unknown W. Brackets
fa42426d21 Clamp the final sample count during decode.
Some games depend on / expect this, or else they'll let important data get
overwritten.
2014-09-23 11:33:20 -07:00
Unknown W. Brackets
68f4a1e7f7 Return the correct next sample at the beginning. 2014-09-23 11:33:20 -07:00
Unknown W. Brackets
0aa7247fea Fix seeking in atrac after the start.
Not sure the very start is right though, arg.
2014-09-23 11:33:19 -07:00
Unknown W. Brackets
4702ae0e41 Add breakpoints to most sceAtrac mem access. 2014-09-23 11:33:18 -07:00
Unknown W. Brackets
6b6bf3f8e6 Correct the dataOff member of atrac context. 2014-09-23 11:33:18 -07:00
Unknown W. Brackets
ac1fcdb269 Skip samples in the first chunk of atrac output.
This seems to be what the PSP actually does, although not sure.  The first
result is always smaller by this amount (numerous atrac files tested.)
2014-09-23 11:32:11 -07:00
Unknown W. Brackets
70705d4a9d Remove incorrect atrac decode ptr nullcheck.
Already shown in decode test to be valid.
2014-09-23 08:32:09 -07:00
sum2012
06fae5bcbc Add a "no loop information" log 2014-09-01 04:47:12 +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
JimLee168
9722e1eb03 Atrac buffer validate RIFF header 2014-07-27 19:02:01 +08:00
Henrik Rydgard
85cb55cb84 Check some addresses in sceAtracDecodeData 2014-07-21 10:30:52 +02:00
Unknown W. Brackets
3fa1481fe9 Cut down on "remaining data in packet" reports.
Looks potentially like a bug in FFmpeg.
2014-07-13 11:26:00 -07:00
Unknown W. Brackets
3ba78c865e Fix low-level atrac3/atrac3+ decoding.
Fixes #6400.
2014-06-24 01:18:00 -07:00
Henrik Rydgard
2236b3a52b sceAtrac3 minor cleanup: Get rid of mutable globals, add another sanity check with reporting 2014-06-22 10:42:27 +02:00
sum2012
f3826bc608 Further add a codecType check 2014-06-22 06:49:02 +08:00
sum2012
6fe74d938e Change to report 2014-06-21 08:00:16 +08:00
sum2012
846eda836f Add a codecType check in sceAtracSetHalfwayBufferAndGetID
Fix crash in #6363
2014-06-21 05:44:29 +08:00
Unknown W. Brackets
77b5cb7629 Reset decodePos in lowlevel decode.
FFmpeg was smart enough to do this for us, but not when we loaded a
savestate.  This is because without a savestate, we returned an initial
small header packet of this size, which gave FFmpeg the idea that seeking
there might help.

But, since we're forcing the decode at a certain position the better thing
is to seek ourselves.
2014-05-29 00:38:20 -07:00
Unknown W. Brackets
f29233386c Initialize some variables. 2014-05-29 00:16:16 -07:00
raven02
4806d01db1 Dostate for resetBuffer 2014-04-22 15:18:24 +08:00
raven02
f845113eb2 sceAtrac: set full filled buffer when game ask to do so via sceAtracGetRemainFrame() 2014-04-22 09:13:49 +08:00
elson
c549a7576e Update sceAtrac.cpp
writebleBytes updated in sceAtracDecodeData
2014-04-18 23:02:24 +08:00
elson
47b7b8b90f fix some game don't add stream data when playing atrac3+ problem 2014-04-18 17:36:11 +08:00
raven02
619039aed6 No need to init packet as {0} 2014-04-07 19:29:57 +08:00
Unknown W. Brackets
aea26f666c Clean up some atrac/mp3 potential leaks. 2014-03-30 15:08:38 -07:00
Unknown W. Brackets
05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
lioncash
b9886942a7 Fix some vertical alignments in misc Core source files. 2014-03-03 11:16:53 -05:00
Unknown W. Brackets
55c59164f7 Try to ignore unimplemented ATRAC features.
Even if it causes the audio to blip, it should continue.  May fix Class of
Heroes and zero no Kiseki (see #5286.)
2014-01-31 21:40:15 -08:00
Henrik Rydgård
169844cc8c MediaEngine/atrac: Initialize some variables, remove use of some deprecated functions 2014-01-27 14:08:05 +01:00
Unknown W. Brackets
79864a5ee0 Fix some initialization order warnings. 2014-01-10 22:21:24 -08:00
Unknown W. Brackets
183b4cb45c Add a static method for creating PSPPointers.
This is still kinda ugly, but the assignment thing was just too ugly, I
couldn't do it anymore.
2013-12-16 23:50:52 -08:00
raven02
29f7d4cb5f Regression fix #4837 2013-12-15 19:54:06 +08:00
raven02
bf93910215 sceAtracGetNextDecodePosition() : write 0 to outposAddr when before return ATRAC_ERROR_ALL_DATA_DECODED 2013-12-15 14:48:08 +08:00