Henrik Rydgård
079f653cff
Sas envelopes: Simplify away some redundant state.
2014-02-11 11:56:24 +01:00
Unknown W. Brackets
0265fc757d
Flip and shift instead of signed divide.
...
Clearer than all those zeroes and maybe faster...
2014-02-11 01:29:33 -08:00
Unknown W. Brackets
b398a84517
Attack switches to decay at max height already.
...
It does not wait until it goes above.
2014-02-11 00:18:36 -08:00
Unknown W. Brackets
95a8af9e60
Decay does not switch to release at height max.
...
This can happen with an exponent rate of 0. It stays there.
2014-02-11 00:17:13 -08:00
Unknown W. Brackets
f11d362be3
Fix integer overflow in exponent decrease.
2014-02-11 00:11:07 -08:00
Unknown W. Brackets
f981d39f94
Sustain defaults to 0, not 0x100.
...
Not sure how I came to that mistaken idea.
2014-02-10 23:48:10 -08:00
Unknown W. Brackets
6392307cbd
Calculate the curve on the fly per the PSP.
...
Values based on lots of testing from the PSP, and match exactly.
2014-02-10 08:43:01 -08:00
Unknown W. Brackets
df7d25f4bf
Correct a case where release rate was set negative.
...
Seems to be capped at INT_MAX like the others, oops.
2014-02-09 11:30:15 -08:00
Unknown W. Brackets
a14850c16b
Drop height to 0 when VAG ends.
...
Otherwise we will set it to !playing and never step the height.
Should fix Yu-Gi-Oh again. Probably release before was miscalculated as
0 which is why it worked before.
2014-02-09 10:53:47 -08:00
Unknown W. Brackets
074ef84559
Correct the rates set by sceSasSetSimpleADSR().
...
They were wrong for a few combinations before. Could have effected how
accurate sound effects were (they may have been too quite, or dropped off
wrong, etc.)
2014-02-07 22:29:54 -08:00
raven02
3f20b5ad77
sceSas : should be always delay thread
2014-02-04 20:03:54 +08:00
Unknown W. Brackets
a00d5a2df8
Set a voice as keyed off when its envelope ends.
2014-02-04 01:35:53 -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
Henrik Rydgård
a8eb92f395
Merge pull request #5237 from raven02/patch-6
...
Return without delay if voicesPlayingCount is zero
2014-01-27 04:16:48 -08:00
raven02
8e8329abec
Fix audio gitches
2014-01-27 19:32:35 +08:00
Unknown W. Brackets
10f52fa2b0
Just in case, also clear results on shutdown.
2014-01-26 19:10:20 -08:00
Unknown W. Brackets
0ca769721a
Log more information about duplicate io operations.
2014-01-26 19:05:07 -08:00
Henrik Rydgård
cc4882267a
Merge pull request #5231 from unknownbrackets/swap
...
Merge just some endian / swap related fixes
2014-01-26 14:44:52 -08:00
Ced2911
451e80c5c8
[core/MediaEndigne] endian fix for video
2014-01-26 14:27:05 -08:00
Henrik Rydgård
8fa6105472
Initialize m_audiopts
2014-01-26 23:21:39 +01:00
Henrik Rydgård
0414a3faa4
Not having voices playing is not an error. Disabling logging of it.
2014-01-26 16:32:29 +01:00
raven02
7701784608
Not reschelding if voicesPlayingCount == 0
2014-01-26 19:52:31 +08:00
Unknown W. Brackets
af411e6b1e
Check for AV_NOPTS_VALUE from ffmpeg pts values.
...
Apparently it's returning this now. If we don't have it, just increment.
Fixes #5217 .
2014-01-25 14:59:28 -08:00
Henrik Rydgård
b333e5b77f
Comment the fallthroughs in SasAudio.cpp
2014-01-23 20:58:42 +01:00
Henrik Rydgård
6c5165e505
Revert "Merge pull request #5190 from raven02/patch-32"
...
This reverts commit aef180259a
, reversing
changes made to d69f02dea0
.
2014-01-23 20:57:39 +01:00
raven02
9965bbb43e
Shouldn't voice.type == VOICETYPE_VAG/PCM
2014-01-24 00:28:53 +08:00
Unknown W. Brackets
f19d8d2eae
Handle alternating video streams a lot better.
2014-01-21 01:16:16 -08:00
Unknown W. Brackets
4102e649d5
Key off the envelope when the VAG/etc. ends.
...
Fixes Yu-Gi-Oh Tag Force GX 3 hanging in some places.
2014-01-13 21:42:42 -08:00
shenweip
dc0d221900
Fix buffer queue.
2014-01-13 21:44:05 +08:00
Unknown W. Brackets
79864a5ee0
Fix some initialization order warnings.
2014-01-10 22:21:24 -08:00
Unknown W. Brackets
2a9e674045
Reset "no audio data" flag when adding more data.
...
It might have audio data. Although, probably, we should detect this when
sceMpegGetAtracAu() is called.
2014-01-10 16:15:03 -08:00
Unknown W. Brackets
7287da38cb
Fix buffer queue when filled in one shot.
...
It would mod by the size and think it was empty, even though it had plenty
of data. This could happen if a game creates a ringbuffer with 512
packets and then does a single put operation with 512 packets.
Such behavior is rare though, since it will cause lag in starting the
video.
2014-01-10 16:13:34 -08:00
Henrik Rydgard
ddfdeb2222
VAGADPCM: no need to check end_ for every sample, it's only modified in DecodeBlock (and Start).
2014-01-04 11:01:44 +01:00
Unknown W. Brackets
936f34a6b7
Check the audio buffer size just in case.
...
This way we definitely won't overfill it.
2014-01-04 01:25:42 -08:00
Henrik Rydgard
0de71f27cb
Optimize the VAGADPCM decoder.
2014-01-04 01:59:20 +01:00
Unknown W. Brackets
4e929764c8
Set the audio/video streams per sceMpegGet*Au().
...
This fixes #2226 , thanks to @raven02 for finding the issue. Could also
help e.g. Xyanide: Resurrection and a few other games.
The video codec change path is not super well tested, because I couldn't
find a game that triggered it, but it should work.
2014-01-03 09:29:37 -08:00
Unknown W. Brackets
82a7680bab
Remove the 5 packet min for openContext.
...
Should be safer, and with retrying, it's no longer necessary.
2014-01-01 21:00:29 -08:00
Unknown W. Brackets
2c38805791
Retry opening the context if it fails at first.
...
This fixes #4550 , the hang on the crash video in FF4.
2014-01-01 20:47:10 -08:00
Unknown W. Brackets
c1dcebce07
Fix savestates when videos are playing.
2014-01-01 20:44:51 -08:00
Unknown W. Brackets
ce7c5e0cf9
Initialize m_decodingsize to 0.
...
Fixes #4609 , intermittent video issues in Lunar.
_PsmfPlayerFillRingbuffer() expects getRemainSize() to return something
useful even before the context is opened.
2014-01-01 15:14:22 -08:00
Unknown W. Brackets
f14361c3b8
Add a bunch more missing cstring includes.
2013-12-30 21:37:19 -08:00
Henrik Rydgård
00c32ddadb
Mostly get rid of including "Globals.h"
2013-12-30 10:17:11 +01:00
Henrik Rydgård
79ff2f0ba8
Start untangling our include mess a little.
2013-12-29 23:34:45 +01:00
Unknown W. Brackets
8e797796e5
Wait for only 5 frames before seeking mpegs.
...
Workaround for Mana Khemia, ugh... must be more complex logic. Valkyrie
Profile still works.
2013-12-17 02:00:57 -08:00
Unknown W. Brackets
3204ec94fb
Forget video end when more packets are added.
...
Good for looping videos, for example Burnout.
2013-12-14 11:33:32 -08:00
Unknown W. Brackets
20b81ef552
Don't try to seek the video with too few packets.
...
Conservatively we seem to need approximately 6, which any video ought to
be longer than.
2013-12-14 11:18:08 -08:00
Unknown W. Brackets
ae0560a1db
Ignore bad video decode addresses.
...
Instead of crashing, even if that's more fun.
2013-12-11 08:21:01 -08:00
Henrik Rydgard
2c9a1123f0
Fix audio regression: Don't "WalkCurve" on state OFF
2013-11-17 23:13:30 +01:00
Henrik Rydgard
b30495c8e8
Reapply the "duration" SasAudio optimization.
2013-11-17 16:49:43 +01:00
Henrik Rydgard
5f51432de7
Revert "More minor SasAudio optimizations"
...
Will reapply later in pieces.
This reverts commit cd251af345
.
2013-11-17 16:46:26 +01:00