Commit Graph

326 Commits

Author SHA1 Message Date
magumagu 87a804fdfc Revert "DSound: use DSound notifications to produce sound."
This reverts commit 4990b8910b.

The commit is causing substantial performance issues for the DSound
backend which I somehow didn't catch during testing.
2014-05-31 13:35:46 -07:00
Lioncash 49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
shuffle2 ca3002977b Merge pull request #256 from magumagu/dsound-notify
DSound: use DSound notifications to produce sound.
2014-05-23 17:02:55 -07:00
degasus 30586f4d29 Add set/get functions for IsFramelimiterTempDisabled 2014-04-30 12:51:13 +02:00
degasus 8483811b39 Add a hotkey for disabling the framelimit.
Atm this is hardcoded to '\t'.
2014-04-30 12:50:53 +02:00
Pierre Bourdon 6bdcbad3e4 Common: Move the Event class to a separate file, and add tests for it. Fix includes everywhere to match this. 2014-04-14 10:54:07 +02:00
magumagu 4990b8910b DSound: use DSound notifications to produce sound.
Pretty straightforward; IDirectSoundNotify lets you register for
notifications after a certain amount of sound has played, so use that
instead of depending on Update() notifications from the CPU thread.

Also, while I'm here, reduce the buffer size by a factor of 4; this seems
to reduce the latency, although the difference is sort of subtle.
2014-04-09 13:41:27 -07:00
lioncash e79895e372 Replace use of the deprecated mem_fun function with mem_fn. 2014-04-01 12:09:22 -04:00
Pierre Bourdon 76fafb1c7b Merge pull request #220 from magumagu/audio-handling-cleanup-v2
Audio handling cleanup v2
2014-03-30 13:24:52 +02:00
magumagu 3afa17f752 Move audio handling out of DSP emulation.
This is good for a couple of reasons: one, it gets rid of duplicated code,
and two, DSP emulation shouldn't need to interact with audio in the first
place.
2014-03-29 11:19:32 -07:00
magumagu 78499e5b7c Delete AudioCommon::UseJIT(). 2014-03-29 11:19:31 -07:00
magumagu 102ea55f20 Move mixer construction to AudioCommon.cpp. 2014-03-29 11:19:30 -07:00
magumagu aac4206664 Move UDSPControl structure into DSP.h . 2014-03-29 11:19:19 -07:00
Pierre Bourdon 664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
magumagu ae9367a89b Delete a bunch of old audio HLE cruft.
This commit intentionally breaks audio output from HLE Zelda UCode; no other functional change.
2014-03-26 11:17:19 -07:00
lioncash aecc8ea666 Remove usesMixer function from the sound streams.
This isn't used anywhere in the codebase. Not even the base SoundStream has it as part of its interface.
2014-03-18 10:42:07 -04:00
lioncash 5e5ab61d0c Mark the audio streams as final.
These aren't intended to be continually extended.
2014-03-18 10:37:45 -04:00
Lioncash a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane 31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Tillmann Karras f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Tillmann Karras c89f04a7c5 clang-modernize -loop-convert
and some manual adjustments
2014-03-09 21:11:59 +01:00
Tillmann Karras 315a8ba1c0 Various changes suggested by cppcheck
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
  include the \0 that is always added?)
- set some free()'d pointers to NULL
2014-02-28 12:43:20 +01:00
Tillmann Karras 6914eca167 Fix various warnings reported by clang
- mostly remove unused variables
- rename some generic JIT identifiers
2014-02-28 12:28:19 +01:00
Pierre Bourdon fca12c4c4e Fix more header sorting issues in AudioCommon/ (now check-includes clean). 2014-02-20 01:01:10 +01:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash 3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Lioncash 6c4ee1753a Fix some vertical alignments
ie. uses spaces for alignment.
2014-02-16 20:12:05 -05:00
degasus 9e56b1d343 Disable framerate correction for OpenAL
OpenAL itself stretch the time on slowdowns, so the Mixer isn't allowed also to change the rate.
2014-02-13 13:22:29 +01:00
degasus bbd58b8f6a change AI sampling rate based on framelimit 2014-02-11 14:53:53 +01:00
degasus ca9fd64df9 controll the interpolation frac by the fifo size 2014-02-11 14:35:19 +01:00
degasus d20dbbc92f audiocommon: sync mixer by fifo instead of estimate values 2014-02-11 07:25:58 +01:00
degasus 2956ffa5be audiocommon: remove 1:1 interpolation
The usual one is 32->48 khz interpolation. So there is no need in a special 1:1 interpolation only for performance.
2014-02-11 07:25:58 +01:00
lioncash d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
degasus ab124b96c4 Atomic Stores / Loads 2014-02-07 00:20:10 +01:00
degasus 5c646d334a Pulseaudio: rewrite the pa backend with the async api
The default async api allow us to set some latency options. The old one (simple API) was the lazy way to go for usual audio where latency doesn't matter.

This also streams audio, so it should be a bit faster then the old one.
2014-02-07 00:20:10 +01:00
Lioncash 249b00c469 Change the modified parameter in the Clamp function to be a pointer.
Makes it easier to identify the one being modified.
2014-02-05 04:04:35 -05:00
Lioncash 6b87a0ef20 Introduce a generic clamp function to clean up some similarly duplicated code. 2014-02-04 20:43:07 -05:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00
Jasper St. Pierre 43e618682e Convert all vcxproj files to UNIX line endings 2013-12-31 14:03:18 -05:00
Lioncash e0aa674c72 Minor const-correctness for some functions in FifoPlayer and some AudioCommon headers. 2013-12-11 08:43:58 -05:00
Shawn Hoffman 33d56f50a4 Re-plumb window handle to the dsound backend.
Reverts parts of commit 71c01d83ab614b9e0c421d03ca694713dbabff48.
Fixes issue 6800
2013-11-07 09:24:56 -08:00
comex c579637eaf Run code through the advanced tool 'sed' to remove trailing whitespace. 2013-11-03 20:54:05 -05:00
comex 965b32be9c Run code through clang-modernize -loop-convert to create range-based for loops, and manually fix some stuff up. 2013-11-03 20:54:01 -05:00
Shawn Hoffman ccd30024b3 Update to VS2013 and a slew of build-related updates. Notes:
* Currently there is no DEBUGFAST configuration. Defining DEBUGFAST as a preprocessor definition in Base.props (or a global header) enables it for now, pending a better method. This was done to make managing the build harder to screw up. However it may not even be an issue anymore with the new .props usage.
* D3DX11SaveTextureToFile usage is dropped and not replaced.
* If you have $(DXSDK_DIR) in your global property sheets (Microsoft.Cpp.$(PlatformName).user), you need to remove it. The build will error out with a message if it's configured incorrectly.
* If you are on Windows 8 or above, you no longer need the June 2010 DirectX SDK installed to build dolphin. If you are in this situation, it is still required if you want your built binaries to be able to use XAudio2 and XInput on previous Windows versions.
* GLew updated to 1.10.0
* compiler switches added: /volatile:iso, /d2Zi+
* LTCG available via msbuild property: DolphinRelease
* SDL updated to 2.0.0
* All Externals (excl. OpenAL and SDL) are built from source.
* Now uses STL version of std::{mutex,condition_variable,thread}
* Now uses Build as root directory for *all* intermediate files
* Binary directory is populated as post-build msbuild action
* .gitignore is simplified
* UnitTests project is no longer compiled
2013-10-26 17:55:38 -07:00
Lioncash 1f0710caf7 Remove some more includes. 2013-10-19 19:59:03 -04:00
Lioncash 97cd42f5c3 Remove some unnecessary includes as well as simplifying exisiting ones if possible. 2013-10-19 19:58:56 -04:00
comex de1773affb Basic precompiled header support for Linux/OS X. Shaves 20-30% off full rebuild time on my system. 2013-10-17 00:07:35 -04:00
Lioncash f3af8ee0f0 Revert "Remove some unnecessary includes."
Turns out this explodes on Linux.

This reverts commit c4696568cc.
2013-10-14 04:05:38 -04:00
Lioncash c4696568cc Remove some unnecessary includes. 2013-10-14 04:01:57 -04:00