Commit Graph

54 Commits

Author SHA1 Message Date
lioncash edd9d0e0ef Clean up more space/tab mismatches in AudioCommon, Common, and VideoCommon.
Not planning to touch Core since it's the most actively changed part of the project.
2013-03-19 21:51:12 -04:00
skidau 718a1b5ded Fixed a buffer overflow in the OpenAL buffer. 2013-02-19 23:18:13 +11:00
Glenn Rice 0ffdd2607f Fix the majority of the compiler warnings unearthed by the addition of
the new warning flags.
2013-01-29 23:24:51 -06:00
Lioncash fe7e691d77 Revert "mem_fun -> mem_fn."
This reverts commit b7d32b0a3d.

OSX C++ std library in charge of holding back progress (as usual).
2013-01-23 23:38:49 -05:00
Lioncash b7d32b0a3d mem_fun -> mem_fn.
mem_fun is deprecated in C++11. Also it does everything mem_fun can do, but more conveniently.
2013-01-23 23:29:50 -05:00
skidau 7402a89e6e OSX build fix 2013-01-16 00:14:31 +11:00
skidau a9388ce2e2 Added backwards compatibility with old OpenAL drivers. 2013-01-16 00:10:49 +11:00
skidau 6d4a566bc4 Changed SoundTouch to use float samples, allowing SSE to be used.
Made the DPL2 decoder disabled by default.
Re-added the audio hack used by the Accurate VBeam emulation option.
2013-01-15 22:29:26 +11:00
skidau 1c462a1eca Added a latency setting to the audio settings.
Removed the Sample Rate setting.  It is now hardcoded to 48000hz (accurate audio timing).

Fixes issue 5672.
2013-01-13 00:05:30 +11:00
skidau 73140c7da7 Skipped timestretching if the emulator is running below 10% speed to prevent buffer overflows. 2013-01-11 23:06:20 +11:00
skidau 3632ce6df5 Removed the synchronisation between the CPU thread and the audio thread.
Added code to detect and resume from buffer underruns.
Disabled the ability to change the DPL2 option after the game has started.
Fixed a memory leak that occurred in the DPL2 decoder.
Fixed the OSX build.
2013-01-11 19:42:03 +11:00
skidau 80f4475e76 Added a Dolby Pro Logic II (DPL2) decoder in the OpenAL backend. DPL2 audio is decoded to 5.1. Code adapted from ffdshow.
Added an option in the DSP settings to disable the DPL2 decoder in case Dolphin incorrectly detects a 5.1 audio system.
Updated the OpenAL files to OpenAL Soft 1.15.1 in the Windows build.

Fixes issue 3023.
2013-01-11 14:03:09 +11:00
Ryan Houdek 01f4d9f386 Fix include paths and compiling in Linux. Externals soundtouch is 1.7.1, while Ubuntu 12.10 is 1.6.x. Externals soundtouch is compiled with integer samples, while ubuntu is compiled with float samples. Float samples is probably the more common route. If you're going to use soundtouch, you should probably use SAMPLETYPE instead of explicitly choosing short. This probably breaks the windows build since its includes aren't setup. 2013-01-09 10:26:12 -06:00
skidau 8494a439c7 OSX build fix 2013-01-10 00:06:35 +11:00
skidau 63b38be97c Added audio time stretching by using the SoundTouch library. 2013-01-09 22:57:32 +11:00
skidau c8c78e0aa9 Implemented correct audio timing.
Fixes issue 5493.
2013-01-07 15:37:08 +11:00
Glenn Rice e85438cba0 Clean up gcc/g++ compiler warnings that have accumulated. 2012-12-10 00:40:28 -06:00
nitsuja 6f1b2d7748 name all audio threads (that I know how to) for debugging, as suggested in response to revision d00b719966. 2012-01-01 14:28:19 -08:00
Jordan Woyak 423018f811 Replaced Common::CriticalSection with a std::mutex implementation. 64bit Windows builds now use SRWLocks and ConditionVariables(requires Vista/7, x64 builds will no longer work on Windows XP x64). Tell me if you hate that. Removed Common::EventEx. Common::Event now uses a std::condition_variable impl.(using ConditionVariables on Windows x64, Events on x86, or posix condition variables elsewhere). I experience slight speed improvements with these changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7294 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05 06:11:26 +00:00
Jordan Woyak 1de40588ac Eliminate some trampoline functions.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7015 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-31 08:19:27 +00:00
Jordan Woyak 2c05c49a04 Replaced Common::Thread with a partial implementation of std::thread. (rvalue references are used if available, <thread> is used if possible) Eliminates the need to use dynamic memory allocation for threads, so it's impossible to forget to delete a thread or set a pointer to NULL. Enables use of type-safe thread functions, no need to cast to and from void*. I've made sure the code compiles in vs08 and tested the functionality of "StdThread.h" on Linux so I'm hoping everything will work :p. In the future "StdThread.h" can be removed (maybe when OS X ships with gcc 4.4 and vs2015 is released :p).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6933 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27 20:47:58 +00:00
Glenn Rice c6e0ea59b9 Removed my previous PanicAlert translation hack. Fixed with a better method suggested by BhaaL. The translation is done by a callback in the MsgHandler routine that is set at program start. Added macros PanicAlertT, SuccessAlertT, PanicYesNoT, and AskYesNoT that are identical to the non T versions except those strings will be added by gettext to the po files to be translated. These can and should be used anywhere in the code for strings that should be translated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6838 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-13 02:05:58 +00:00
Soren Jorvang ef093a4d35 Use the proper type for printing the OpenAL default device name.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6540 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-07 22:38:03 +00:00
sl1nk3.s 449b21fd65 Fix an issue with OpenAL not properly using the correct Volume on boot
Proper fix for issue 1886 as well as a fix to OGL fullscreen code that might fix issue 2095

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5028 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-07 19:36:29 +00:00
ayuanx 9eea60ca69 Sound System Rework: Phase 2
. Performance boost
  (Completely non-blocking between Sound thread and CPU thread, in the meantime keeping them thread safe)

. Both 32KHz & 48KHz sound can be handled properly now
  (But up-sampling is still not implemented, and I don't think any game requires it.)

. Strategy adjustment
  When your PC is *NOT* capable to run the game at 100%:
  >> DSound    Could yield more fluent sound than OpenAL sometimes, but you will lose the sync between video & audio (since audio is played before video to guarantee fluency)
  >> OpenAL    Ensures video & audio are always sync'ed, but sound could be intermittent(to let slow video catch up)

. Changed default frame limit to: Auto
  (Somehow this can dramatically decrease the chance of wiimote desync in game NSMB)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4724 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-23 15:34:14 +00:00
ayuanx c3b196541d Added volume control for OpenAL, also improved its performance a bit, but don't expect too much.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4712 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-20 13:54:14 +00:00
ayuanx 51163196d3 Now OpenAL works, at least.
But Dolphin's sound stream system really needs a rethink.
Because this is the root cause of constant blocking.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4711 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-20 02:23:26 +00:00
ayuanx 7b6a0f9b72 Thread safe.
PS: The OpenAL is a mess.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4710 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-18 19:52:04 +00:00
ayuanx afef9fb5f0 Code cleanup, removed extern declaration in sound streams
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4688 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-13 11:51:29 +00:00
ayuanx fad1fa4e3d Improved XTra.KrazzY's Mute-On-Pause a bit, so it won't cost any CPU time when it is not used.
Revert old Zelda-TP hack, though it really shouldn't be there...



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4684 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-12 22:30:53 +00:00
XTra.KrazzY 6bea0a2f53 Fixed annoying sound when pausing/shutting down (please test for ALL backends) (couldn't do this for CoreAudio and PulseAudio too)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4676 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-10 21:00:52 +00:00
XTra.KrazzY a0129e51a3 LUAInterface should have all its functionality now (excluding input/controller management). Now we need a GUI to see how it works. Added new DSP function: ClearAudioBuffer, which clears the audio buffer for pausing. Currently it doesn't work with DSound.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4507 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-07 20:01:39 +00:00
XTra.KrazzY c86d2e5129 Now ALL copyright dates are fixed to the legally correct year: The year in which the project began. Now we don't have to change it every year :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3898 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28 21:32:10 +00:00
Sonicadvance1 15de161f95 Woops, I had changed this line on accident
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3798 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-15 11:37:11 +00:00
Sonicadvance1 e28145fccf Commit to allow Interpreter to work on devices that don't support SSE2, just via simple defines
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3797 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-15 11:36:01 +00:00
Sonicadvance1 13290204b4 Woops
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3703 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-07 14:31:43 +00:00
Sonicadvance1 440c0c1d14 Trying to get Dolphin to compile in Xcode, had to rename the Debugger namespace to something else since the name collided in OS X when using Xcode/Cocoa. Everything compiles except for the GL plugin, and the actual main Dolphin program. Will be trying to get them to compile after sleeping
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3701 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-07 14:04:56 +00:00
LPFaint99 a41c1b2d0a add *.user, Win32, and x64 build dir to ignore list for DebuggerUICommon and Unit Tests
add *.aps to ignore list for DolphinWX dir
add eol-style native to 120 or so files

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3689 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-06 02:10:26 +00:00
magumagu9 3034a9fcfc Misc warning fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3668 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-03 23:14:06 +00:00
hyperiris ff0ec2b3f8 a NEED DEBUG version of openal sound system, nakee, try to FIX it! :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3409 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-12 14:40:50 +00:00
Sonicadvance1 be61375c01 Fix compile in OSX by reverting my change, dunno why OpenAL is different on my machine. Bit of debug work in nJoy test
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3100 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-28 20:05:00 +00:00
Sonicadvance1 c3926a35ae Only have this in OSX since that is only where it compiles apparently?
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3061 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-24 05:42:57 +00:00
Sonicadvance1 599d9e9067 Fix OSX compiling. Still need to rollback nakee's revision 2566 if you want it to link in to a binary though. SMS under my unibody MBP looks like crap, dunno what's wrong
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3059 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-24 01:51:42 +00:00
nakeee 5a9fcaea62 linux compile fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2915 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-07 12:32:11 +00:00
tmator c662713ba0 osx build fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2912 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-07 03:56:21 +00:00
hyperiris 36143f98b7 OpenAL: YES! The first version of working OpenAL Backend!
I've only test in Ikaruga and Metroid Prime, at least they have sound.
Performance is ugly, :<, still need more work on it.
To enable oal in Dolphin, uncomment Source/Core/Common/Src/Common.h:
//#define HAVE_OPENAL 1



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2865 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-04 03:58:16 +00:00
Shawn Hoffman ccdec4308a really fix building without OAL, and disable it (for time being i guess) on windows...crazy non-static libs no one wants to deal with
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2811 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-31 03:58:47 +00:00
nakeee caf1395f5e Fixing compile without openal
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2810 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-30 20:25:36 +00:00
XTra.KrazzY c3a843b5a8 OpenAL: Minor fixes (someone beat me to the other fixes)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2807 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-30 19:47:41 +00:00
hyperiris 4de53b3c10 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2800 8ced0084-cf51-0410-be5f-012b33b47a6e 2009-03-30 14:57:51 +00:00