Commit Graph
6340 Commits
Author SHA1 Message Date
Unknown W. Brackets 23441d12fb Sas: Estimate time taken for mixing.
Tests seem to show it's not affected by mhz.
2015-11-25 18:44:34 -08:00
Unknown W. Brackets 5a6c8b513c Sas: Drain thread before reading/writing SAS state.
This should be the safest option, but I'm pretty sure some operations give
a BUSY operation or have different behavior, actually.
2015-11-25 18:44:32 -08:00
Unknown W. Brackets fc8acc781e Sas: Add config for SAS thread. 2015-11-25 18:44:31 -08:00
Unknown W. Brackets 0394319e89 Sas: Drain thread on savestate. 2015-11-25 18:44:30 -08:00
Unknown W. Brackets 6290ac6cbd Sas: Process SAS on a separate thread.
Remaining issues:
 * Need a config setting.
 * Locking for voices / config?
 * Locking for atrac interop?
2015-11-25 18:44:30 -08:00
Unknown W. Brackets 7bfe100b0f Fix some unused variable warnings.
The CheckAlpha one looks like it will matter.
2015-11-25 16:11:53 -08:00
Henrik Rydgard 9825dad340 Zero deleted objects in the kernel object pool
Just doing this to narrow down the possible causes of our crashes in WaitSema/SignalSema that I can't reproduce and only have Android auto-reports of... The crash comments do mention the GTA games though.
2015-11-25 14:24:32 +01:00
Henrik Rydgard 7dd631b7f2 Some code reformatting of the kernel object pool
Also deletes an unused [] operator
2015-11-25 13:00:29 +01:00
Unknown W. Brackets 8c337850fc Disallow thread termination in interrupts.
But only for certain SDK versions, as per testing.
2015-11-15 11:38:59 -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 c22c181148 Sas: Automatically unpause voice on unset ATRAC3.
Thie fixes voices in Sol Trigger after skipping a cutscene, and matches
tests.
2015-11-09 08:25:35 -08:00
Unknown W. Brackets 5374e6a8fc Sas: Add validation for ATRAC3 voices. 2015-11-09 08:25:28 -08: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
tpunix 6672534f49 bugfix of scefont
charCode should be limit to 16bit
see issue #8131
2015-11-01 21:11:31 +08:00
Henrik Rydgard b998131581 Move the symbol map to the heap, deallocate it when no game is running. 2015-10-31 23:01:19 +01:00
Unknown W. Brackets a13683e777 Add some param validation for sas functions. 2015-10-31 09:20:14 -07:00
Henrik Rydgård 9cdd23c089 Merge pull request #8105 from unknownbrackets/atrac-parsing
Improve atrac parsing and differentiate streaming from data
2015-10-31 13:00:15 +01:00
Henrik Rydgård 5ebb5d5630 Merge pull request #8116 from hrydgard/reverb
Implement sceSas' reverb effect, guessing that the reverb is the same as the one in PSX's SPU
2015-10-29 11:13:04 +01:00
Sacha bbc4f64999 MIPS: Fix build so we can compile this again. 2015-10-29 02:46:43 +00:00
Henrik Rydgard 22f71f1e9a Show simple info about currently playing audio in on-screen Debug Statistics 2015-10-28 21:20:20 +01:00
Henrik Rydgard 85c8f7d3c2 Hook up SasReverb. It sounds more like a buzzsaw than a reverb at the moment, needs debugging.
Added a bit of code that only enables it when a reverbed sound is active. This will need to be turned off later but useful right now for hearing when it's used..
2015-10-27 12:36:30 +01: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