Commit graph

81 commits

Author SHA1 Message Date
Unknown W. Brackets
92585403c4 Sas: Make ADSR fields private. 2023-01-14 16:55:40 -08:00
Henrik Rydgård
e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Unknown W. Brackets
3df6cb704f Global: Fix some type conversion warnings.
Hidden by some warning disables.
2022-01-30 16:09:33 -08:00
Henrik Rydgård
d981511459 Misc cleanup 2020-10-31 18:32:43 +01:00
Unknown W. Brackets
fd8a0612fa SaveState: Initialize some memory that is saved.
At the very least, will help them compress better.  Also good not to leak
random memory.
2018-06-22 21:29:18 -07:00
Henrik Rydgard
d4ea291a10 Set PSP_SAS_MAX_GRAIN correctly. 2017-03-20 09:42:46 +01:00
Henrik Rydgård
ad04f97acb Fix bug causing stack overflow in SasAudio, #9190. Move the mixbuffer off the stack for easier-to-diagnose error (this trashed the info I needed to debug pretty badly...) 2016-12-27 18:32:47 +01:00
Henrik Rydgard
1e095951dd Replace while loop with division (technically a right shift). 2016-12-20 22:02:40 +01:00
Henrik Rydgard
e802fb0b73 Remove the verification. 2016-12-20 21:42:11 +01:00
Henrik Rydgard
451388070a Fix bug. Now use the quick inner loop, just need to redo the sample reader... 2016-12-20 21:37:31 +01:00
Henrik Rydgard
61f80edda3 SasAudio: Straightforward implementation of linear interpolation.
Not sure about the performance impact, but calling ReadSamples with 1 as
an argument can't be terribly fast. So this might need some redesign
before merge, but should be a good starting point.
2016-12-20 20:23:00 +01:00
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
6b413a808f Atrac: Handle SAS end the same way as other types.
It makes sense to match, and this sounds right in Sol Trigger.  Haven't
tested in detail yet, but it should prevent cutting off sounds.
2015-11-08 12:23:32 -08:00
Unknown W. Brackets
42222ad497 Sas: Support the dry flag as well as wet. 2015-11-01 20:32:35 -08:00
Unknown W. Brackets
a13683e777 Add some param validation for sas functions. 2015-10-31 09:20:14 -07:00
Henrik Rydgard
9fa6f1f89d Minor improvements to audio debug display 2015-10-31 13:02:19 +01: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
ec2d88cf17 Make the vag block buffer s16.
The values are clamped already, anyway.
2015-10-24 13:08:10 -07:00
Unknown W. Brackets
03bd1b9b69 Initialize a few sas values earlier.
This just makes things a little safer, none of these ought to be used
without Start or similar.
2015-03-28 13:06:57 -07:00
Lioncash
f830d5dec7 Core: Mark some functions as const 2014-12-03 15:16:11 -05:00
Unknown W. Brackets
4702ae0e41 Add breakpoints to most sceAtrac mem access. 2014-09-23 11:33:18 -07:00
Henrik Rydgard
c8e719e165 Inline ADSREnvelope::Step (thanks @unknownbrackets)
(Some compilers want it declared inline in the header too)
2014-03-22 09:31:09 +01:00
Unknown W. Brackets
d65af7353b Avoid some ChunkFile includes. 2014-03-15 11:32:57 -07:00
Unknown W. Brackets
c806ae0982 Revert "Optimize mixing samples at common pitches."
This reverts commit dd434cd7c5.

Conflicts:
	Core/HW/SasAudio.cpp
2014-02-23 08:48:30 -08:00
Unknown W. Brackets
ff920f6af6 Fix sceSas outputMode = 1 (which is not mono.)
May fix games that played audio only on the left side, or something.
2014-02-22 07:52:18 -08:00
Unknown W. Brackets
11df9dabf9 Add an extra delay to VAG keyon.
It seems to come in an extra sample late.  PCM doesn't.

This corrects timing for VAG samples so they match up exactly.  Really
minor, of course...
2014-02-18 23:32:37 -08:00
Unknown W. Brackets
93060e3aef Avoid some divisions, just in case. 2014-02-17 23:19:30 -08:00
Unknown W. Brackets
dd434cd7c5 Optimize mixing samples at common pitches.
Doesn't seem to be a big help but may matter more on mobile.
2014-02-17 21:09:44 -08:00
Unknown W. Brackets
139c91fe19 Return an error for an invalid pitch, per tests. 2014-02-17 21:09:43 -08:00
Unknown W. Brackets
e006ab5b2d Don't read the first 32 samples after keyon.
The way I'm approximating this is ugly...
2014-02-17 01:39:59 -08:00
Unknown W. Brackets
6b984c5593 Don't loop PCM samples when loopPos < 0. 2014-02-17 01:39:59 -08:00
Unknown W. Brackets
95fc9624b4 Fix PCM looping in SAS.
The parameter specifies where the loop restarts at.
2014-02-17 01:39:58 -08:00
Unknown W. Brackets
d53ab02e5b Don't change height immediately on keyon.
This replicates the PSP's behavior, which is a 32-grain lead in, plus the
height remains what it was before until processing happens.
2014-02-17 01:39:55 -08:00
Henrik Rydgård
079f653cff Sas envelopes: Simplify away some redundant state. 2014-02-11 11:56:24 +01: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
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
raven02
3f20b5ad77 sceSas : should be always delay thread 2014-02-04 20:03:54 +08:00
raven02
7701784608 Not reschelding if voicesPlayingCount == 0 2014-01-26 19:52:31 +08:00
Henrik Rydgard
0de71f27cb Optimize the VAGADPCM decoder. 2014-01-04 01:59:20 +01:00
Henrik Rydgård
00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +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
Henrik Rydgård
cd251af345 More minor SasAudio optimizations 2013-11-15 12:28:16 +01:00
Henrik Rydgård
21006dc6a7 SasAudio: Compute envelope duration on state changes only. 2013-11-15 12:05:10 +01:00
Henrik Rydgard
f0e47838c6 Just break out some functions in SasAudio 2013-10-24 01:19:08 +02:00
Henrik Rydgard
a790c0a723 SasAudio: Add some comments about reverb, and add the reverb type list 2013-10-23 22:59:42 +02:00
Unknown W. Brackets
e95f55a5fe Fix some enum type warnings. 2013-10-19 14:57:45 -07:00
Henrik Rydgård
ac2334386a Move BufferQueue out of the at3 plugin header 2013-10-17 12:31:22 +02:00
Unknown W. Brackets
fe1f4d53c6 Return an error on bad SAS sample rate.
Also reorder the types to fit the PSP's flag values.
2013-09-01 16:59:37 -07:00