Commit Graph

504 Commits

Author SHA1 Message Date
Unknown W. Brackets
20ad7f2914 Audio: Track SRC frequency.
sceAudioSetFrequency is kernel mode only, and it sounds like it changes
the audio controller clock (didn't test.)  SRC only affects the SRC
channel.

Currently, this doesn't actually use the sample rate yet, but at least
it's tracked appropriately.
2019-06-30 23:09:46 -07:00
Unknown W. Brackets
e4e0cdd0f7 Audio: Add volume for alternate speed.
Fixes #11605.
2019-06-23 13:34:08 -07:00
Henrik Rydgård
ff65b813d9 Assorted warning fixes 2019-05-10 23:26:34 +02:00
Henrik Rydgård
2f26297062 Clean up some more ifdefs 2019-05-10 23:25:57 +02:00
driver1998
5072584781 Fix neon headers for MSVC ARM64
MSVC uses arm64_neon.h for ARM64, arm_neon.h is ARM32 only.
2019-05-04 22:45:15 +08:00
Unknown W. Brackets
4ee5d2b611 Mp3: Correct seek to specific frame.
Before, it treated it as an (incomplete) seek to a byte position, which
didn't make much sense.  This matches PSP behavior per tests.
2019-04-29 04:47:59 -07:00
Unknown W. Brackets
bfa9aa009d Mp3: Properly flush the buffer on reset. 2019-04-29 04:47:59 -07:00
Unknown W. Brackets
4b4c0f9bda Mp3: Always output data in decode, except at end.
Turns out this doesn't return 0 until the end, even if there's no data
available to decode.  It just writes zeros in that case.
2019-04-29 04:47:59 -07:00
Unknown W. Brackets
fde59c955d Mp3: Use a vector for the temp buffer.
Hopefully will move to reading RAM directly.  I think this was not always
adding data properly, as I got wrong output after decode.  Makes more
sense as a vector, anyway.
2019-04-29 04:45:36 -07:00
Unknown W. Brackets
ac43e55194 Mp3: Loop correctly from an offset.
If the offset points to an ID3 tag or the middle of a frame, that's fine -
it should just search forward to the next sync.  FFmpeg just returns a
decode error, so we do this first.
2019-04-28 08:35:35 -07:00
Unknown W. Brackets
e4817b4e83 Mp3: Reset sum decoded on loop.
And only on loop, not when getting add info (which clearly doesn't loop,
from tests.)
2019-04-28 07:55:29 -07:00
Unknown W. Brackets
a3640f303b Mp3: Correct sum decoded sample count.
It shouldn't consider both channels of stereo.  This could've been causing
some games to think they were playing audio at an incorrect speed.
2019-04-28 07:30:56 -07:00
Unknown W. Brackets
bc1e6e12f5 Mp3: Return total frame count in sceMp3GetFrameNum.
This might fix games failing to play mp3s correctly.
2019-04-28 07:10:26 -07:00
Unknown W. Brackets
df9c922198
Merge pull request #10783 from LunaMoo/fillSoundBuffer
Remove "sound speed hack"
2019-04-28 06:20:13 -07:00
LunaMoo
0a4dc1f883 Remove "sound speed hack". 2019-04-25 04:15:31 +02:00
Unknown W. Brackets
0d6570e8ad Mp3: Correct sceMp3GetMaxOutputSample.
Was based on output buffer size, rather than frame size, before.

Fixes choppy audio in Velocity.
2019-04-24 14:31:12 -07:00
Unknown W. Brackets
be6710ea4a Mp3: Fix errors for a bunch of init getters. 2019-04-24 14:13:46 -07:00
Unknown W. Brackets
e4d2712897 Mp3: Apply offset to stream read buffer.
Handle errors for sceMp3CheckStreamDataNeeded as well.
2019-04-23 21:14:54 -07:00
Unknown W. Brackets
f9863c3be2 Mp3: Align CheckStreamDataNeeded with InfoToAdd.
May cause problems if they don't match.
2019-04-23 20:42:13 -07:00
Unknown W. Brackets
f1eaf9dc0e Mp3: Don't change buffer accounting until add.
If we just ask what we should add, that is meant to stay static until we
do actually add it.

This also reduces the max we ask for at a time, which better matches
correct behavior and might impact game behavior.
2019-04-23 20:18:16 -07:00
Unknown W. Brackets
b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07: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
Jan Beich
7a7c655615 MediaEngine: adjust for AVStream.codec deprecation 2018-06-13 11:52:18 +00:00
Unknown W. Brackets
395ac32d63 Debugger: Run memory breakpoints on mobile. 2018-06-06 17:31:56 -07:00
Unknown W. Brackets
289928a170 Sas: Correct calculation of VAG end.
Not sure why everything is negative one indexed, but this prevents reading
beyond the size of the buffer.

This shouldn't change sound output, but it may fix a crash if VAG is at
the edge of memory (unlikely, though.)
2018-06-06 06:08:31 -07:00
Unknown W. Brackets
b56e3e8e94 Sas: Correct delay in playing samples.
We still need to walk during the delay to "use it up."  Need to test more
to see if we can just walk once directly into ATTACK - might depend on
pitch.

This also makes the first play ignore the resampleHist, which matches
samples to tests properly, and ignores linear interp for exact pitch.

These changes fix all the sascore tests that used to work.
2018-06-06 06:04:25 -07:00
Henrik Rydgård
f76e5e70a7 Enable FlushInstructionCache on UWP, it's been allowed finally.
Minor warning fixes, UWP buildfix

Retarget UWP project to latest SDK.
2018-03-20 20:30:33 +01:00
Henrik Rydgård
d81cbd6969 Linux buildfix 2017-08-31 17:58:31 +02:00
Henrik Rydgård
6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgård
b3b459507a Neon-optimize the audio s32->s16 packing function 2017-08-15 16:16:25 +02:00
Unknown W. Brackets
1fdf7c5373 UI: Skip game bg lookup without game.
This avoids trying to identify a file without a name.
2017-03-24 22:15:22 -07:00
Unknown W. Brackets
7a7e4ed23f Video: Enable threads for video decoding.
This was previously getting (accidentally?) enabled by the call to
`avformat_find_stream_info()`.  See #9262.
2017-03-22 20:36:42 -07:00
Henrik Rydgard
d4ea291a10 Set PSP_SAS_MAX_GRAIN correctly. 2017-03-20 09:42:46 +01:00
Henrik Rydgard
23367925f1 Change a PanicAlert to an ERROR_LOG. Should possibly report..
http://forums.ppsspp.org/showthread.php?tid=1310&page=3

Add a comment.
2017-03-18 21:25:30 +01:00
Henrik Rydgård
440e72d250 Clean up among the logs. Remove MASTER_LOG. 2017-03-06 13:10:23 +01:00
Henrik Rydgard
d64f367e1d Assorted warning fixes 2017-03-05 10:52:45 +01:00
Henrik Rydgard
26a2d42731 Big mutex overhaul - remove our custom ones, make them non-recursive where possible 2017-02-28 11:40:29 +01:00
Henrik Rydgard
fcbc20f240 Small changes to make Common and Core build under my preliminary UWP setup. 2017-02-24 18:59:41 +01:00
Henrik Rydgard
19d321bd8c Fix a bad memory leak in sceMpeg 2017-02-20 11:12:39 +01:00
Henrik Rydgård
baf01ab99d Fix #9196 - bug with new audio interpolation when delay was bigger than grainsize. 2016-12-30 09:52:32 +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 Rydgård
88ad1cb3d8 Attempt to workaround #9190 2016-12-27 11:55:45 +01:00
Henrik Rydgard
1e095951dd Replace while loop with division (technically a right shift). 2016-12-20 22:02:40 +01:00
Henrik Rydgard
ff4b99dd97 Replace for-loop with multiplication 2016-12-20 21:52:25 +01:00
Henrik Rydgard
6782f7c75d Just figure out how many samples to read, then read it, instead of one-by-one. 2016-12-20 21:47:50 +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
064795216e Add parallel resampling algorithm that reads directly from the temp buf 2016-12-20 21:05:23 +01:00
Henrik Rydgard
47df134b66 Optimization step 1: Separate the loops, save history from buffer. 2016-12-20 20:50:34 +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