RadWolfie
603f086180
Replace silence with predefined volume min
...
Plus don't re-set volume twice.
2018-04-29 12:40:44 -05:00
RadWolfie
e9bdc1f0b5
Append check if stream is paused
2018-04-29 12:40:44 -05:00
RadWolfie
ae3f812347
Small fixup for Pause functionality
...
Plus do set status outside of DS_OK state too.
2018-04-29 12:40:44 -05:00
RadWolfie
0043262818
Fix previous commit
...
Oops...
2018-04-29 12:40:44 -05:00
RadWolfie
c8aa74a85a
Update Stream creation to similar of Buffer does
2018-04-29 12:40:44 -05:00
RadWolfie
ffc70d0721
Move early enough to output org lVolume before set
2018-04-29 12:40:44 -05:00
RadWolfie
1294db22f6
Add support for SetHeadroom function
...
Untested btw, yet the concept should work as is.
2018-04-29 12:40:44 -05:00
RadWolfie
f35add180c
Missed another patch requirement for DSound Stream
2018-04-29 12:40:44 -05:00
RadWolfie
be63382661
Change print format mistake
...
Might be printing wrong numbers.
2018-04-29 12:40:44 -05:00
RadWolfie
0493faaf43
Oops...
...
Should not be looping in here.
2018-04-29 12:40:44 -05:00
RadWolfie
5da6e0c9d2
Fix older XDK titles crash
2018-04-29 12:40:44 -05:00
RadWolfie
d19efc44f9
Fix SW: KotOR title
...
Packet was incomplete due to dwMaxSize is greater than 5 seconds worth
of data.
Plus fixup synch flags whenever is able to add/remove its limitation.
2018-04-29 12:40:44 -05:00
RadWolfie
3f51494f48
Also DSP function being ignored too
2018-04-29 12:40:44 -05:00
RadWolfie
1b9405c8b8
Fix passdown value for second call.
2018-04-29 12:40:44 -05:00
RadWolfie
990b87198e
Replace NULL to nullptr since it is pointer...
2018-04-29 12:40:44 -05:00
RadWolfie
3c723d2763
Various bug fixes
...
* no reason to re-set value twice from SetBufferData
* passdown the length, not offset
* use counter instead of count
* if size is the same replace "out of memory" to "ok" result, and ignore
DSP image function.
This is the corrections, however doesn't cover every faults few titles
has atm.
2018-04-29 12:40:44 -05:00
RadWolfie
7fb1451fee
Add SwitchToThread inside loop when buffer playing
2018-04-29 12:40:43 -05:00
RadWolfie
18c6948153
Fix SetBufferData biggest issue of all
...
!Major breakthrough!
Titles improved:
* The Simpsons: Road Rage (now has music and voiceover audible)
* Ghost Recon: Thunder Island (No longer output distort noises ingame.
100% sure the rest of sequels will work correctly.)
2018-04-29 12:40:43 -05:00
RadWolfie
3590aa0f19
Another small update
...
* Only perform a buffer resize. Allow play function to make buffer
update only.
* Removed unused parameters.
2018-04-29 12:40:43 -05:00
RadWolfie
17ca484370
Small updates
2018-04-29 12:40:43 -05:00
RadWolfie
73ebd2f893
Also fix DS Buffer GetStatus function too.
...
PAUSED (xbox) and BUFFERLOST (host) are using same value. We're only
enforcing 3 flags for xbox.
2018-04-29 12:40:43 -05:00
RadWolfie
5e48c63046
Replace unimplemented to ignored for HRTF functions
2018-04-29 12:40:43 -05:00
RadWolfie
be6fab6b7e
Add audio debug mute control
...
For pinpoint which audio is causing problem then troubleshoot from
there.
2018-04-29 12:40:43 -05:00
RadWolfie
f16423a17e
Update copyright year
2018-04-29 12:40:43 -05:00
RadWolfie
8b9570e5ee
Remove unused function
2018-04-29 12:40:43 -05:00
RadWolfie
0f48c04b31
Fix possible Pocketbike Racer audio skipping bug
...
At least should resolve the bug, need tester to test it one more time to
verify the bug is gone for good.
2018-04-29 12:40:43 -05:00
RadWolfie
ebe552f62c
Add another minor note
2018-04-29 12:40:43 -05:00
RadWolfie
d93990264f
Add test case log for DS Stream Process function
2018-04-29 12:40:43 -05:00
RadWolfie
8ac0bb1371
Last fixup for mixbin
...
There are other identifiers of mixbin, except we're not focusing on
them.
2018-04-29 12:40:43 -05:00
RadWolfie
7627267c15
Preserve and correct some volume stuff
...
We don't want volume to constant increase over time. 😉
2018-04-29 12:40:43 -05:00
RadWolfie
e5bd691615
Another fixup for XDSMIXBIN flags
2018-04-29 12:40:43 -05:00
RadWolfie
edd526ff2f
Add some support for SetMixBinVolumes_8
...
Plus include pre-set volume for if one of audio codec is disabled to
both Buffer and Stream class creations.
2018-04-29 12:40:43 -05:00
RadWolfie
db2c8017d2
Move note to above function
2018-04-29 12:40:43 -05:00
RadWolfie
d14ab3b0e6
Fix note for SetMixBinVolumes patch
2018-04-29 12:40:43 -05:00
RadWolfie
4a115afc26
Remove debug messages
...
No longer is necessary.
2018-04-29 12:40:43 -05:00
RadWolfie
11222a8538
Another minor fixup for Flush function
...
Plus ensure flags are reset inside Discontinuity function.
2018-04-29 12:40:43 -05:00
RadWolfie
e7d38340ec
Minor fix for hybrid pause function
2018-04-29 12:40:43 -05:00
RadWolfie
30e36f36de
Revert PAUSENOACTIVATE since it broke audio for RF2
...
Originally, it might be correct in the first place. It may has to do
with given parameter of buffer class to be output.
2018-04-29 12:40:42 -05:00
RadWolfie
55661cd3d2
Include rtTimeStamp parameter support
...
This commit covers:
* FlushEx (DSound Stream only)
* PauseEx (DSound Buffer & Stream)
DSoundStream class should no longer cause audio problems this time for
any titles except for mixbin stuff.
2018-04-29 12:40:42 -05:00
RadWolfie
5bd4faba8e
Fix DSound Stream's SetFormat
...
TODO: might need callback and context passdown as well?
2018-04-29 12:40:42 -05:00
RadWolfie
03d2f50d93
Buffer also has PauseEx, add member for it
2018-04-29 12:40:42 -05:00
RadWolfie
be82e8ef4a
Replace DSB_FLAG_XXXX to DSE_FLAG_XXXX
...
Doesn't make sense to use DSB since we are using emulated flag to
trigger events of what xbox would do.
2018-04-29 12:40:42 -05:00
RadWolfie
12b4a12f2e
Stub support to have Flush process data too.
...
Need to implement ASYNC support via separate thread worker. <-- is a
requirement.
Confirmed Flush will perform busy-state until audio is stop.
2018-04-29 12:40:42 -05:00
RadWolfie
156ea1d73a
Fix GetStatus since both Buffer and Stream are diff
...
Stream class has its own flags which is 100% different than Buffer
class.
However, it needs more implement support for Flush(Ex) in order to
prevent titles to loop base on Stream class' status output.
Coming Soon™
2018-04-29 12:40:42 -05:00
RadWolfie
c6635f5261
Fix GeneratePCMFormat for 2+ channels mask
...
Confirmed my theory on 4 channels given with attempted 6 channel masks
cause invalid arg on DirectSound buffer creation.
Affected title:
* Ghost Recon 2 (Only happen after 3 or 4 FMVs)
2018-04-29 12:40:42 -05:00
RadWolfie
98daf26e40
Don't trigger/set values during release process
...
Untested, yet in theory is correct.
2018-04-29 12:40:42 -05:00
RadWolfie
cc781826c3
Fix audio buffer allocation
...
Use prediction if do have enough buffer purpose before allow allocate.
This fixed Mafia title for loading "running man" mission.
Plus add log info for SetEvent failure.
2018-04-29 12:40:42 -05:00
RadWolfie
d8246a0074
Remove SelectionT from DSound
...
Since region has been merged into one buffer usage. SelectionT no longer
a requirement to toggle between main and region buffers.
2018-04-29 12:40:42 -05:00
RadWolfie
c5de8c2174
Introduce emulation of xbox audio managed memory
...
At least emulate xbox audio buffer limitation accurately.
TODO: Need to find max values for Free2DBuffers and Free3DBuffers from
GetCaps function. Then emulating HLE will become more accurate.
Improved title:
* Burnout (Both menu and in-game are now audible.)
Other titles does not appear affected by this change for now.
2018-04-29 12:40:42 -05:00
RadWolfie
20cf54aba1
Redo swap since it got revert somehow.
2018-04-29 12:40:42 -05:00