Commit Graph

595 Commits

Author SHA1 Message Date
Gregory Hainaut 1bd8113f66 cmake: add various option to disable plugin support 2016-03-30 10:19:54 +02:00
Jonathan Li b516c1001a windows: Set _WIN32_WINNT to 0x0600 (Windows Vista) 2016-03-13 13:41:16 +00:00
Jonathan Li 9ed9b2d8cd windows: Switch to DefaultPlatformToolset aka non-XP toolsets
Basically I ran
find . -name "*.vcxproj" -exec sed -i -e 's/_xp//' {} \;

This will likely break XP, but it paves the way on Windows for a PCSX2
that does not require the DirectX redistributables to be installed for
Windows 8, 8.1 and 10 users. Windows Vista and 7 users will still require
the DirectX redistributable files for XInput and XAudio, though PCSX2
should still be capable of running if a user does not actually use either
of them.
2016-03-13 12:04:28 +00:00
Jonathan Li 2d4e2fb8cb windows: spu2-x does not use the emitter
So let's not specify it as a build dependency.

Also remove some unnecessary manual library linkage and remove the
wsWidgets GUI property sheet, which does nothing useful.
2016-02-28 11:08:08 +00:00
Jonathan Li d5e56c7e76 spu2-x: Use _WIN32 for Windows preprocessor macro 2016-01-27 22:49:41 +00:00
Gregory Hainaut 5a20d629ab spu2x: add comment on the previous fix
Always enabled it for all SDL2 versions. A shift won't kill perf.
And no surprise if they backport the behavior on older version.
2016-01-24 12:41:29 +01:00
Gregory Hainaut 90c5f0e1ae spu2x: tentative fix for SDL 2.0.4 2016-01-24 11:01:41 +01:00
Jonathan Li 8a61c7d336 spu2-x:windows: ifdef XAudio2 2.7 specific stuff
Support for XAudio2 2.8+ still requires build configurations that use
the Windows SDK include and library files (instead of the DirectX SDK
files).
2016-01-17 22:06:32 +00:00
Gregory Hainaut 3f17898bf5 spu2x: linux compilation fix 2016-01-09 14:26:57 +01:00
Gregory Hainaut 74db92bee4 Merge pull request #978 from juhalaukkanen/apple_osx_master_merge
OSX 32bit build
2016-01-08 20:09:37 +01:00
Avi Halachmi (:avih) df356694c5 spu2-x: stretcher: allow minimum latency of 15ms (was 30ms)
15ms latency is too little most of the time, but if the stars align (light game,
fast system, the correct audio output module - portaudio comes to mind), it
might work well/reasonably, so allow it.

Watch the console for stretcher related messages. If you hear bad audio (clicks
etc) or notice reset/underruns messages, it means the latency is too low. The
optimal behavior (stretching is locked to 1:1) is when a message "stretch: None (1:1)"
shows at the console, which isn't followed by a message "stretch: Dynamic" or
resets or spu2 underruns.

I'm pretty sure such low latency with good performance (mostly locked to 1:1)
was not possible in the past, but it seems possible (sometimes) now. Maybe the
previous "black magic" commit helps

The default is still 100ms which is still fine for most cases.

This commit affects Windows. Linux still has a different minimum, probably
mostly due to UI/constants. Maybe someone should test and change that too.
2015-12-25 01:49:53 +02:00
Avi Halachmi (:avih) 22c9d882a8 spu2-x: stretcher: dampen the tempo adjustment to reduce resonance
I don't have a fully scientific explanation here, but it seems that with big
buffers (~200ms and up), the stretcher adjustment can overshoot the target
equilibrium back and forth, in effect never stabilizing.

This commit makes it change slightly slower which somehow seems to improve its
behavior. Sorry for not having a better explanation, as at this stage tuning the
stretcher has become somewhat of a black magic.

But hey, if it works...

Tested with buffers from 30ms to 1000ms, and with playback speed and speed
changes between 30% and 500%, and as far as I can tell it only makes it better.

Fingers crossed.
2015-12-24 23:26:29 +02:00
ramapcsx2 05f1dca151 Merge pull request #990 from turtleli/windows-fixes
Windows: Potential fix for XAudio2.7 unload crashes
2015-12-22 16:56:06 +01:00
Jonathan Li 000f4984cf spu2-x:windows: Potentially prevent XAudio2.7 unload crashes
The extra LoadLibrary call prevents XAudio2.7 from unloading since
LoadLibrary reference counts. See
http://blogs.msdn.com/b/chuckw/archive/2015/10/09/known-issues-xaudio-2-7.aspx

Should fix random XAudio2 crashes.
2015-12-20 20:08:20 +00:00
ramapcsx2 43b9caf735 GSdx: default renderer to DX11 hw. SPU2-X: default output module to xaudio2 (portaudio has issues selecting the proper hardware device) 2015-12-20 14:46:59 +01:00
Juha Laukkanen c72400e927 Darwin/OSX - spu2x apple build with portaudio only.
OSX compilation fix: spu2x: Windows & Linux
2015-12-02 05:01:12 +02:00
Akash 004ef3d451 SPU2-X: prevent signed/unsigned comparisons 2015-11-20 21:17:05 +05:30
Akash f90eeb7861 SPU2-X: handling text during restore defautls
Previously the sound touch configure caption box will still have the outdated value of the sliders when using the restore defaults function, update the caption text also during restore defaults. ( use the first slider value for caption since that lies closer to the restore default box )
2015-11-20 21:17:04 +05:30
Gregory Hainaut 2a0cd77eef spu2x: avoid 64 bits compilation issue
Reported by 3kinox
Solution given by unknownbrackets
2015-11-13 18:48:03 +01:00
Gregory Hainaut 6180515212 spu2x: sign compare 2015-11-12 12:10:49 +01:00
Jonathan Li 44d89308c9 Revert "Revert "gsdx|spu2-x: Use atlcomcli.h for CComPtr definition""
This reverts commit 9bb990e9ed.

Fight! Ahem...
2015-11-09 20:55:07 +00:00
Jonathan Li 9bb990e9ed Revert "gsdx|spu2-x: Use atlcomcli.h for CComPtr definition"
This reverts commit 0eb771c2a6.

The buildbot apparently cannot find atlcomcli.h. Oh joy.
2015-11-08 20:46:41 +00:00
refractionpcsx2 545e47aacc Merge pull request #960 from ssakash/SPU2-Xconlog
SPU2-X: Update Console log to display Delay Cycles from the INI
2015-11-08 14:31:15 +00:00
Jonathan Li 49ff324882 Merge pull request #955 from turtleli/replace-comptr-h
gsdx|spu2-x: Use atlcomcli.h for CComPtr definition
2015-11-08 13:27:28 +00:00
Akash a45f3ac5d6 SPU2-X: Handle INI changes to variable on Conlog 2015-11-08 10:47:03 +05:30
refractionpcsx2 8ed56bd971 Merge pull request #953 from ssakash/SPU2-X_debug
SPU2-X: New INI variable for cycle delay
-Configurable for Higurashi no Naku Koro ni Matsuri Kakera Asobi (SPLM-66913)
2015-11-07 16:54:54 +00:00
Akash ff77708e0e SPU2-X: New INI variable for cycle delay 2015-11-07 20:16:23 +05:30
Jonathan Li 0eb771c2a6 gsdx|spu2-x: Use atlcomcli.h for CComPtr definition
VS2013/VS2015 community includes it, so everything will still compile
for everyone.

Also delete common/include/comptr.h.
2015-11-06 18:52:33 +00:00
Gregory Hainaut d0ea904cdf spu2x: remove hyperlink in windows about box
Code isn't free (and kinda useless)
2015-11-04 07:43:00 +01:00
Gregory Hainaut c3d8cc0978 Merge pull request #897 from PCSX2/coverity-spu2x-mixer
spu2x: correctly apply the volume to the external source
2015-10-31 20:10:43 +01:00
Jonathan Li e31cb8cbcd spu2x-sdl: restore WX2.8 build compilation
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-10-31 11:06:15 +01:00
Gregory Hainaut 66259dee17 spu2x-sdl: always use 16 bit formats
32 bits range is too big and requires to maximize the volume.
2015-10-30 17:38:12 +01:00
Gregory Hainaut 2a68c3585c spu2x-sdl: fiddle with SDL to init the selected API
Note: SDL_Init is mandatory oterwise SDL_OpenAudio will redo the init.
So the only sane way is to initialize pulseaudio, close everything, and finally
init the requested driver.

V2:
* ifdef SDL2 code

V3:
* use std::string for m_api (avoid issue issue with wx2.8)
* call the good function to properly close subsystem avoid crashes
2015-10-30 17:37:25 +01:00
Gregory Hainaut 84c6455c95 spu2x-sdl: add a gui setting to select the API
The purpose is to workaround bug with default API

Code is not ideal because SDL/gui are mixed. But it would be enough
for future release.

V2: ifdef SDL2 code
2015-10-30 17:13:45 +01:00
Gregory Hainaut 50e6306331 Merge pull request #919 from ssakash/coverity_init
Coverity: Initialize class members
2015-10-25 20:08:46 +01:00
Akash e4490694f1 SPU2-X: Initialize all class members
CID 147033 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)16. uninit_member: Non-static class member ActualPaCallback is not initialized in this constructor nor in any functions that it calls.
2015-10-25 14:11:44 +05:30
ramapcsx2 79075282e5 Merge pull request #922 from ssakash/spu2-x_realtime
SPU2-X: Fix a "Fixme" part of the code.
2015-10-24 16:33:36 +02:00
Akash 5d13dfee25 SPU2-X: Remove a logically impossible break
* the break doesn't get used since HANDLE_CHECK consists of a break on the function itself.
* removed an outdated comment since realtime update of configure has been done.
2015-10-24 19:48:52 +05:30
Akash 0cc4287b59 SPU2-X: Realtime update for soundtouch configure
previously the soundtouch configure box required a total exit of the dialog to get the configure box value updated , now it's made to be done in an instant.
2015-10-24 19:34:24 +05:30
Gregory Hainaut e8fdd99962 spu2x-sdl: keep only C++11 code path
Linux supports C++11 completely.
2015-10-24 14:14:37 +02:00
Gregory Hainaut b6d9ea86ee spu2x-sdl: memset the stream buffer in SDL2
Fix #382
2015-10-21 22:13:29 +02:00
Gregory Hainaut 53c38ef2cc spu2-sdl: move the ifdef to support automatic indentation 2015-10-21 20:54:09 +02:00
Gregory Hainaut 96bf714d85 spu2x-sdl: unique_ptr is always supported
So let's drop various ifdef
2015-10-21 20:36:07 +02:00
Jonathan Li 7fac189ab3 spu2-x:linux: Fix potential null deference
Coverity CID 146911: Dereference before null check (REVERSE_INULL)
2015-10-18 14:01:27 +01:00
Gregory Hainaut 096e5e1fef spu2x: correctly apply the volume to the external source
CID 147046 (#1 of 1): Useless call (USELESS_CALL)
side_effect_free: Calling ApplyVolume(Ext, Cores[1].ExtVol) is only useful for its return value, which is ignored.
2015-10-16 23:17:07 +02:00
Jonathan Li 4208267966 gsdx|spu2-x:windows: Scale GUI logo with DPI
The SS_REALSIZECONTROL style resizes image to fit the control window, so
let's use that.
2015-09-21 20:45:50 +01:00
Miguel A. Colón Vélez c97c4f878a Update pthreads project.
- Add x64
- Use static library
2015-08-25 09:53:00 -04:00
Miguel A. Colón Vélez 09c8a41294 Update SoundTouch to 1.9.0.
It claimed to be 1.7.1 but it had a mixture from various
versions. It was hard to update as everything in the top directory
so I used upstream's way to organize files. I renamed include to
soundtouch since I did not want to #ifdef that for windows.
.
Wavfile.h is a private header so I used the private path instead of
moving the file over. This changed 3 files in the plugin folder.
2015-08-22 10:16:27 -04:00
Miguel A. Colón Vélez a1de0614d7 Remove vs2012 files.
It does not support several things from C99/C++11 that are
used in the project.
2015-08-18 01:15:51 -04:00
Miguel A. Colón Vélez a1e56518a5 Rename inside the files. 2015-08-18 00:44:49 -04:00
Miguel A. Colón Vélez 277217353e Rename files. 2015-08-18 00:44:35 -04:00
Miguel A. Colón Vélez 1fe5aceded Enable round-tripping.
- Remove ToolsVersion
- Use $(DefaultPlatformToolset)_xp until XP support is dropped.
Note: opencl had no XP support and was not enabled in VS2012.
2015-08-18 00:44:19 -04:00
Gregory Hainaut 0e783f0003 Merge pull request #750 from nE0sIghT/feature/deoptimize
Use global compiler optimization flags instead of defining them for every plugin/binary
2015-08-08 16:42:12 +02:00
nE0sIghT e1272dc2f9 Use global compiler optimization flags instead of defining them for every plugin/binary 2015-08-08 16:25:17 +03:00
Miguel A. Colón Vélez 0e533e1630 Fix Unicode issues in SPU2-X with PortAudio. 2015-08-07 15:51:54 -04:00
Miguel A. Colón Vélez 6462393aaf Introduce end-of-line normalization
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-08-04 23:52:48 +02:00
Gregory Hainaut 7aa36133de Merge pull request #657 from turtleli/wxwidgets3_switch
Windows: switch to wxWidgets 3.0
2015-07-29 14:16:02 +02:00
Jonathan Li 25b9b24f77 spu2-x: windows: Fix incorrect use of scanf
Half width specifiers were not used, so scanf was writing ints into
bytes.

Note: Visual Studio 2013 doesn't support the hh format specifier.
2015-07-23 19:01:15 +01:00
Jonathan Li 150c53af0f spu2-x: windows: Remove Unicode to Ascii conversion
Use swscanf instead of sscanf to read wide characters directly
2015-07-23 18:58:24 +01:00
Jonathan Li db6a32ac33 windows: switch to wxWidgets 3.0
This replaces wxWidgets 2.8 with wxWidgets 3.0 plus all the necessary
include/referencing to get PCSX2 to compile.

VS2012 change is untested.
2015-07-13 21:19:12 +01:00
Jonathan Li 283d4fa57c Use wc_str for Windows only code
This fixes the build for wxWidgets 3.0. The paths are Windows specific,
so c_str and WX_STR already evaluate to a wide string in wxWidgets 2.8.
2015-06-19 22:14:47 +01:00
Gregory Hainaut ba5b367ae8 drop support of Visual Studio 2010
* Severals PR uses C++11 features
* 2015 will soon be released
* Win 10 will soon be released

Time to upgrade
2015-06-04 08:55:22 +02:00
Gregory Hainaut c456764342 spu2x: declare exported function as stdcall
* Fix a stack buffer overflow on address sanitizer
* Might explain an old clang crash
2015-04-17 18:24:23 +02:00
Gregory Hainaut 66d7aa75e2 cmake: move -DNDEBUG to global option 2014-12-20 13:43:25 +01:00
Gregory Hainaut a99f3ea321 cmake: remove duplicate flags
also use the lighter elseif structure to reduce a bit the size of cmakefile
2014-12-20 13:43:25 +01:00
Gregory Hainaut 43e854fece spu2x: remove duplicated function 2014-12-20 10:54:18 +01:00
Gregory Hainaut 35f26f00bc Merge pull request #386 from PCSX2/remove-tls
spu2x:zzogl: disable TLS
2014-12-11 09:55:17 +01:00
Gregory Hainaut 3d071e50ad gtk3: gtk_hscale_new_with_range => gtk_scale_new_with_range 2014-12-10 22:09:21 +01:00
Gregory Hainaut e9233f4698 gtk2: use text rather than image
Require by GTK3
2014-12-10 22:09:21 +01:00
Gregory Hainaut 7fb548d7c5 gtk2: GTK_OBJECT is useless 2014-12-10 22:09:21 +01:00
Gregory Hainaut ba9e998ff5 gtk2: port gtk_combo_box to gtk_combo_box_text
The former was deprecated on gtk2.24 (and removed from gtk3)
2014-12-10 22:09:21 +01:00
Gregory Hainaut a52f598369 spu2x:zzogl: disable TLS
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation

Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.

TLS exhaustion creates issue to dlopen plugins
    issue #384 : https://github.com/PCSX2/pcsx2/issues/384

But also for profiled build (-fprofile-generate)
    http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate

If someone have a better idea, please raise your hand!
2014-12-08 22:26:46 +01:00
Gregory Hainaut 0a4f9e43d9 cmake: clean sdl management
* sdl is mandatory for spu2x
* cmake will include either /usr/include/SDL or /usr/include/SDL2 so no
  need to add extra ifdef
2014-12-07 21:06:21 +01:00
Gregory Hainaut c945aead54 cmake: better support of SDL2
Description: Building with SDL2_API=TRUE is incomplete
 SDL_FOUND does not imply SDL2_FOUND
 Use check_libs for detection
 Only include ${SDL_INCLUDE_DIR} when needed
 Use SDL2_LIBRARIES
Author: Miguel A. Colón Vélez

Gregory: add back SDL_BUILDING_LIBRARY
2014-12-07 12:19:14 +01:00
Gregory Hainaut fa3db52cf7 partially revert commit 9fd2f3dd8a
No need to add Linux sillyness in Windows file... (Hopefully close #323)
2014-10-04 11:33:34 +02:00
Adam Hirst b98e53e059 Minor spelling/punctuation fixes in SPU2-X 2014-10-02 12:35:13 +02:00
Gregory Hainaut 5b3f031654 cmake: fix commit f3a50a01a7
* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
  => use the variable instead to hardcoded value
2014-09-24 09:02:56 +02:00
Johannes Obermayr 9fd2f3dd8a Don't use build date on openSUSE.
Fixes RPMLINT warning:
pcsx2.i586: W: file-contains-date-and-time /usr/bin/pcsx2
Your file uses  __DATE and __TIME__ this causes the package to rebuild when not needed
2014-09-17 22:37:34 +02:00
Johannes Obermayr 7b1d3ba7ea Do commits 2bc2047 and f287754 the right way ... 2014-09-16 19:11:11 +02:00
Johannes Obermayr 2bc2047770 cmake: Fix RPATH/RUNPATH issue with openSuse wxWidgets libdir.
Gregory: Add an if clause to only change the rpath on openSuse

For me it doesn't follow the FHS => http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/fhs.html
2014-09-14 13:12:26 +02:00
uyjulian f3a50a01a7 cmake: Use previous macros in CMakeLists.txt files
Gregory: add a c lib for zzogl-pg-cg replayer
2014-09-05 20:16:23 +02:00
Sacha 2ae3dd970a Fix case of 'soundtouch' instead of creating a symlink as a workaround. 2014-08-13 18:54:31 +10:00
Ryan Houdek 3d37a6ce27 Removes the usage of __LINUX__ define
This is defined and set it a ton of different places.
It's checked in a whole lot more
Instead just use __linux__ like a real project should
2014-08-03 13:20:36 -05:00
Gregory Hainaut 82c7bcd761 wx3.0: compilation fix for arch linux
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string

Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.

Close issue #172
2014-08-03 14:54:44 +02:00
Gregory Hainaut 8a43789db5 zzogl/spu2x: clang warning fix
Nothing critical
2014-07-20 22:07:02 +02:00
Lioncash 0a825a1aa4 SPU2-X: Fix some signed/unsigned mismatch warnings. 2014-07-15 00:09:48 -04:00
Lioncash 7ec3cf46d6 SPU2-X: Fix float truncation warnings 2014-07-14 20:26:38 -04:00
Gregory Hainaut 492d67c6e8 spu2x: use std::abs (c abs support only integer) 2014-07-12 15:59:29 +02:00
Gregory Hainaut 2084ead56c spu2x: linux port of Giga lastest update
=> Advanced (per-channel) Volume Adjustment AKA Room Correction

windows: update CfgReadFloat to really return a float
2014-06-28 11:23:44 +02:00
gigaherz 654343f875 Advanced (per-channel) Volume Adjustment AKA Room Correction (Windows-only, need someone to fix the linux counterpart) 2014-05-11 17:26:00 +02:00
Gregory Hainaut 75c64e12aa license: add missing header
Still miss lots of copyright header but we are better
2014-04-12 19:42:41 +02:00
Gregory Hainaut 37b1d3ae42 codeblock: remove build file => linux is cmake only
They are completely out-dated. And nobody have time to update them.
2014-04-11 09:18:31 +02:00
gigaherz 4362cc0e9a Fixed a few references to Googlecode, and a few mentions of the "svn" word in comments.
Other instances of "svn" in filenames and such remain, but they are not high priority and I didn't want to mess with updating all the project systems.
Closes #19.
2014-04-05 18:38:41 +02:00
gigaherz f7c1b6e060 Git-based versioning. 2014-03-25 13:31:36 +01:00
gigaherz 888f0a27da Remove vs2008 project files, since they have become outdated, and complicated to maintain.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5902 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-15 18:24:06 +00:00
refraction 82d5194a4f SPU2-X: Just fixing up a small error i came across while looking into something else. Nothing to see here.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5893 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 17:52:33 +00:00
ramapcsx2.code b99aa05cbf Small round of patches for various issues.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5830 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 14:25:48 +00:00
ramapcsx2.code 72f7b70f7b SPU2-X:
WinXP should be exempted from Portaudio as the default for now. 
It has a large latency with DirectSound compared to direct use and XA2 isn't available at all.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5823 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-24 17:03:50 +00:00
gigaherz 01daa0b6fd Change the vs2012 project files to use the v110_xp platform toolset, and the vs2013 project files to use the v120_xp platform toolset, so that the resulting executables can be run in Windows XP/2003.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5822 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-24 15:30:34 +00:00
ramapcsx2.code 992a453a68 SPU2-X:
The preferred audio output module is PortAudio, so making it the default under Windows now (it is already on Linux).
It will use wasapi mode with the default sound device by default, both are configurable though.
This setup gives us better latency and a higher time stretch polling frequency, resulting in better quality overall.
With this we can also lower the main latency default from 150ms to now 100ms.
There is no error checking for the wasapi mode selection yet, as I don't know how this should be done. 
Help would be appreciated (gigaherz!) :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5821 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-23 15:19:43 +00:00