Commit Graph

2654 Commits

Author SHA1 Message Date
Luke Usher a5252ec5e7 The 4361 version of SetRenderState_PSTextureModes actually existed back in 4134 2017-07-29 19:25:06 +01:00
Luke Usher 05f885778c Fix most incorrect Direct3D return types.
Testing so far doesn't seem to have made any difference to execution at all, but this had potential to cause issues, it's good to get it right!
2017-07-28 22:23:24 +01:00
Luke Usher 5e73acde07 Backup and restore original FillMode rather than overwrite with SOLID when Wireframe mode is disabled.
I haven't noticed any changes relating to this, but it was possible that a title could set D3DRS_FILLMODE to Wireframe and get overwritten by Cxbx-Reloaded.
Now we keep the original value
2017-07-28 08:24:30 +01:00
Ben ca1066fafc Update README.md (#536)
Added compatibility link
2017-07-28 06:18:12 +01:00
PatrickvL a8033fee8b Fixed duplicate use of XBEIMAGE_MEDIA_TYPE_DVD_5_RW (9 was intended) (#534) 2017-07-27 14:50:31 +01:00
Luke Usher 3ee227bf74 Merge pull request #529 from LukeUsher/various-tweaks-and-fixes
Various Bug Fixes and Improvements
2017-07-26 22:18:05 +01:00
Luke Usher ce96ef0083 Restore an intentional Sleep(); 2017-07-26 22:15:34 +01:00
Luke Usher 68cd19547e Fix a regression in ZSNES 2017-07-26 22:14:02 +01:00
Luke Usher aed96f115e Fix an issue with CMcpxBuffer::Play being undetected after commit #4f019d9440 2017-07-26 21:40:29 +01:00
Luke Usher aee4d7d487 Update CONTRIBUTORS 2017-07-24 08:15:55 +01:00
Luke Usher 3ca1a35479 Merge pull request #514 from RadWolfie/HLE-Audio-Improvement
HLE Audio Improvement
2017-07-23 18:19:13 +01:00
Luke Usher eb7b7e5ece Replace some Sleep() with SwitchToThread
This prevents Windows giving up the Cxbx processes timeslice, allowing other xbox threads to run.

This fixes the audio stuttering in JSRF!
2017-07-23 18:13:20 +01:00
RadWolfie 577010fc59 Update CONTRIBUTORS
Audio improvements by RadWolfie and blueshogun96.
2017-07-23 12:12:41 -05:00
RadWolfie b222d82376 Update XADPCM.h
Removed author since it is not part of author's work.
2017-07-23 06:17:27 -05:00
Luke Usher b46d4ce6a8 Merge branch 'HLE-Audio-Improvement' into various-tweaks-and-fixes 2017-07-23 08:59:06 +01:00
RadWolfie 85ff52e502 Disable Legacy Audio Hack Option
Currently legacy audio hack option is not implemented, so it's disabled
before merge into master repo. Plus force all unimplemented functions to
output once, not repeatly.
2017-07-22 21:43:02 -05:00
RadWolfie 3da46a9a15 Implement Specific Codec Audible
* NEW: PCM, XBOX_ADPCM, and unknown codec audible are functional.
* FIXED: Preserve volume whenever buffer is resize.

This will allow all dev and testers to test and report which codec is
not outputing audible properly.
2017-07-22 21:43:02 -05:00
RadWolfie b82954ef09 Oops...
Forgot to re-append hRet result test.
2017-07-22 21:43:02 -05:00
RadWolfie d052a19690 Implement Initialize Audio Settings
First attempt to obtain audio settings configured by user request. At
the moment, selecting audio adapter device is functional. More to come
later on...
2017-07-22 21:43:02 -05:00
RadWolfie 4dad779758 Audio Settings Stub
First initialization audio settings support.
2017-07-22 21:43:02 -05:00
RadWolfie 7c7799be99 Serveral Fixes base on RETURN_RESULT_CHECK macro
* Missing control frequency flag to control base on Smashing Drive
title.
* SetVolume return invalid arg due to setting MIN volume is -10,000.
Changed mockup into between -10,000 and -6,400 as silence.
* SetFormat has been tweaked a bit as workaround for now. It needs to
create new buffer for secondary buffer usage.

Known Issue:
SetConeOrientation continue to return DSERR_INVALIDPARAM flag in Turok
Evolution for some reason. All args look right and is fine to me...
2017-07-22 21:39:27 -05:00
RadWolfie db3c23066d Introduce RETURN_RESULT_CHECK for DSound
Performing this method shall reduce hidden failures.
2017-07-22 21:39:27 -05:00
RadWolfie a3872923a7 Play Should Be Using Play Flags
Oops... And fix a trigger for X_DSBPLAY_FROMSTART to be check "if"
properly.

This fix no audio from Psyvariar 2 - Extend Edition gameplay. 🎉
👍
2017-07-22 21:39:27 -05:00
RadWolfie 836376c0a1 Minor Improvement
- Added check if DirectSound3DBuffer8 is null due to dummy WAVEFORMATEX
causing issue for DSBCAPS_3D flag.
- Another code standard fix.
- Forward SetConeOutsideVolume to hybrid function to reduce duplicate
code.
2017-07-22 21:39:26 -05:00
RadWolfie c3121b740a Minor Fix
Also need check if it is not null before check flag. Miami Vice crashed
just for this issue.
2017-07-22 21:39:26 -05:00
RadWolfie a762ead109 Minor Coding Standard 2017-07-22 21:39:26 -05:00
RadWolfie ee39f4f16d More SynchPlayback Stub
And use lock's offset given by title for another accuracy.
2017-07-22 21:39:26 -05:00
RadWolfie 607c71eba3 Reduce Buffers Unlock Duplicate 2017-07-22 21:39:26 -05:00
RadWolfie 2e88311aa4 Various Fixes Again
- Renaming variable type to uppercase to keep code sanity.
- Re-add debug message from SynchPlayback.
- Corrected flag check for to play or not to play audio buffer.
- Verified dwFlags is the same as windows for lock buffer.
2017-07-22 21:39:26 -05:00
RadWolfie fc936cfc9c Reviewed Coding Correction 2017-07-22 21:39:26 -05:00
RadWolfie 9a834a9f52 Implement SynchPlayback Support
- Moved play caller into HybridDirectSound to perform same task.
- Added DSB_FLAG_SYNCHPLAYBACK_CONTROL flag for control.
2017-07-22 21:39:26 -05:00
RadWolfie 7c7fa2f795 One More...Correction...
Just one tiny correction even though it has no affect to execution.
2017-07-22 21:39:26 -05:00
RadWolfie b7fd5ad4c0 Add Comments
Adding comments before implement support for simple SynchPlayback
control.
2017-07-22 21:39:26 -05:00
RadWolfie 1ffb2ddb23 Various Fixes
- Renamed dwFlags parameter to correct name which is dwEmuFlags
- Fixed wrong variable pass down in ResizeIDirectSoundBuffer's parameter
(oops)
2017-07-22 21:39:26 -05:00
RadWolfie 1a90cc95bc Another Improvment
Preserve dwOffset from locked pointer, this should prevent audio
disortion from other titles and more accurately.
2017-07-22 21:39:26 -05:00
RadWolfie 12b7ac5c4a Fix Coding Standard 2017-07-22 21:39:26 -05:00
RadWolfie 6acc0483d4 Rename DSoundBufferUnlockXboxAdpcm
Changed DSoundBufferUnlockXboxAdpcm to DSoundBufferXboxAdpcmDecoder
since it is performing a decode in locked memory and new buffer.
2017-07-22 21:39:26 -05:00
RadWolfie 41b9a32d7b Audio Improvment
Only does small improvement to audio.

- Rayman Arena's first intro, xbox audio, no longer make any rare
popping noise.
- Xbox Dashboard background sound is improved big time.
- Turok Evolution background music in-game and credits are improved
except there is still noise in-between.
2017-07-22 21:39:26 -05:00
RadWolfie 7f70076676 Renaming 2017-07-22 21:39:25 -05:00
RadWolfie 85f6dc1ad7 Various Changes
- Changed all DirectSound usage to use v8 since it does have more
methods. This allow few more support to audio.
- Implement Support for 3DListener
-
2017-07-22 21:39:25 -05:00
RadWolfie dbd39115e6 Prevent Deadlock in Multithreading
- Moved return value since using actual function cause crashes for
multiple titles.
- Changed 0 to nullptr since cache audio classes are using by xbox.
2017-07-22 21:39:25 -05:00
RadWolfie 14172824b1 Fixed Various Issue
- Corrected File linkage for EmuDSoundInline.hpp (Thanks PatrickvL)
- Check if is not a null variable in release referred by PatrickvL
- Add missing passdown to ResizeIDirectSoundBuffer function (oops)
- Add another test case for SYNCHPLAYBACK

Should compile this time.

Known regress issue:
JSRF report dirty disc - Wait until DirectSound audio control is
implement, then it will go away.
2017-07-22 21:39:25 -05:00
RadWolfie 28cdfafb4c Improve and Fix Release Control
Improvised release management.
2017-07-22 21:39:25 -05:00
RadWolfie 39f828187c Format Document Automatic
Used Visual Studio's format document feature to format it accurately.
- Append semicolon for all FUNC_EXPORTS to prevent indent wrong
position.
- Moved asterisk to the left for all pointers in function's parameters.
2017-07-22 21:39:25 -05:00
RadWolfie 7be9240a16 Enforce Coding Guideline
All this is done by hand with regex search built-in.

- Replaced all tabs to whitespaces
- Any single check process internal are included with brackets
- Corrected any misalign whitespaces
2017-07-22 21:37:40 -05:00
RadWolfie 740fcd7ffb Maintenance Multiple Callers Doing Same Purpose
- Moved all duplicate functionality in inline header (hpp) file.
- Several fixes
- Removed all 3DListener since it is only possible in primary buffer.
Future commit will restore it into primary buffer creation.
- Force output whatever is not implemented for DSound library section in
release build. It will help me know which title is calling it and at
least make it a priority.
2017-07-22 21:37:40 -05:00
RadWolfie 91fff43ff4 Missing define and fixed wrong function 2017-07-22 21:37:40 -05:00
RadWolfie 5aab408594 Debug Info for audio conversion check
Just a debug info feature in case XADPCM audio did not play nicely.
2017-07-22 21:37:40 -05:00
RadWolfie 69ac865b4c Fixed XADPCM audio bug in DirectSoundStream_Process
NOTE : XADPCM audio has occurred in Rayman Arena first intro video, all
other title's intro videos are PCM so far. This is only a temporary
solution for now.

Plus fixed expected standard for cbSize on PCM format.
2017-07-22 21:37:40 -05:00
RadWolfie dcb759f52c Minor Touch Up
Just a minor touch up for value and stub for DirectSoundBuffer_Pause
(untested yet should work okay since it is working for DirectSoundStream
stub. Included warning just in case such title has unsupported value for
pause function.
2017-07-22 21:37:40 -05:00