summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon
AgeCommit message (Collapse)Author
2010-06-02Fix some cases of variables being used uninitialized. Also some unusedSoren Jorvang
variables, writeable strings and dangerously shadowed variables. index(), gamma(), exp() and y0() are POSIX functions and using those names can cause namespace confusion. A number of C files were missing the final newline required by ANSI C and some versions of GCC are pedantic enough to complain about this. These changes simply the scons build, allowing us to get rid of filterWarnings which is simply more trouble than it's worth. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02Meta:Soren Jorvang
Using Unix tools to operate on a tree containing filename with spaces in them is really annoying, so rename the handful of instances where there were spaces. Host.cpp has never been used. Games tend to lookup the following directories that we don't yet have anything to put in, so prepopulate them in Data/User/Wii: title/00010001 title/00010002 title/00010003 title/00010004 title/00010005 title/00010006 title/00010007 meta shared2/title Set eol-style native on a number of text files which didn't already have it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5572 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02Fix typo.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5571 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-01fix AudioCommon including linux headers on windowsShawn Hoffman
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5568 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-01Hopefully fix building on Linux.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5566 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-01Now that Core Audio works, reduce the number of build permutations a bit Soren Jorvang
by not linking in other Unix audio modules. Use kAudioUnitSubType_DefaultOutput instead of kAudioUnitSubType_HALOutput so that a runtime switch to another audio device is automatically handled. Use ERROR_LOG for audio errors. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5562 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-31Have the AudioUnit callback drive the internal mixer directly insteadSoren Jorvang
of going through an intermediate thread and buffer. This seems to be how Core Audio is meant to be used, although I still haven't read the manual. Indeed, sound on OS X works perfectly now. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5555 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-30Get the audio unit output buffer size and use that as the renderingSoren Jorvang
quantum, as the callback wants us to provide exactly the amount of samples needed. This is incomplete because core audio may ask for less than the full buffer size (for me, typically 1484 or 1488 bytes of a 2048 byte buffer). As a quick hack until I read the rather impenetrable core audio documentation, assume that each callback request will want about the same number of samples as the preceeding one. This makes sound bearable. Also various cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5543 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-21Linux: Better ALSA supportpierre
This removes some bad behaviour, like the audio thread busy waiting inside ALSA code, missing begins of voice samples(due to DSP_HLE code not getting called often enough). Turns out my understanding of ALSA API was lacking. Tested with pulse plugin and directly on my intel-hda/realtek hardware. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5461 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-07Linux: Fix horrible latency when the alsa pulseaudio plugin is involved, see ↵pierre
issue #2651 The fix is asking alsa for a prefered "hardware" buffer size, so alsa does not fall back to pulseaudios offering of ~1 minute. Additionally, alsa busy waits when pulseaudio is used, sw:avail_min is set and hw:buffer_size is small. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5439 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-24XK patch for adding jit config to audiocommon/c16 function to x64emitternakeee
and Skidu's fix for 64bit git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5230 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-08Added a null check when stopping the DSPHLE plugin with the DSound back-end. ↵skidau
Fixes the DSPHLE crash on stop. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5172 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-12Fix a Memory leak in CoreAudio backend, around 2MB. Stops OpenCL from trying ↵Sonicadvance1
to decode CMPR textures, as it fails horribly. Fixes a memory leak in EXI devices, where the destructor wouldn't be called, causing a 32MB leak with memory cards(if you have two), and maybe a bit more from the other EXI devices git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5042 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-07Fix an issue with OpenAL not properly using the correct Volume on bootsl1nk3.s
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-07EXPERIMENTAL: an attempt to fix Issue 1725ayuanx
Please test, especially on multi-Wiimote. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5024 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-05Correct stopping of Core in OSX via Command+Q, and fix a thread from not ↵Sonicadvance1
dying when stopping with CoreAudio git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5013 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-02Some small clean up + fixes to make valgrind happynakeee
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4991 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-31Fix minor issue with inclusion of OpenAL headersGlenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4988 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-20Nullsound killed - Fixes Issue 1082Marko Pusljar
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4907 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-18Change the order so selected iso will be first and only then the default iso.nakeee
Some other minor cleanup git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4880 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-17Allow OSX to quit Dolphin cleanly in NoWX build with command+Q. Not sure how ↵Sonicadvance1
to let them do it via close button in the Window git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4866 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-14This could alleviate the suffering of dual core synchronization a bit.ayuanx
But I doubt you would notice it in most cases. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4830 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-12coreaudio backend make sound nowtmator
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4814 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-25Wiimote: More work, don't ask, no answerayuanx
nJoy: Maybe this could reactivate multi-pad? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4729 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-25Sound System Rework: Phase 2 (cont'ed)ayuanx
. Fixed super fast refresh rate issue . Recovered <TAB> shortcut key for ThrottleSkipping . Removed redundant "soundstream->Update()" in DSPLLE (Thanks to LordMark) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4728 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-23Sound System Rework: Phase 2ayuanx
. 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-22Sound System Rework: Phase 1ayuanx
. Fixed Sample Rate for DSP (Now if your CPU is capable to run game at 100%, you will get pure sound without buzz or static noise) . Fixed Sample Rate for AI (Now if your CPU is capable to run game at 100%, you will get sync'ed video and audio) . Fixed Backend list for DSPLLE . Improved Aduio DMA a bit (There might be a completely redesign in following phases) WARNING: The whole rework will take time to complete. This commit is compilable, but could be unstable. So you can try it and test it but don't take it as a release rev! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4717 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-20Added volume control for OpenAL, also improved its performance a bit, but ↵ayuanx
don't expect too much. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4712 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-20Now OpenAL works, at least.ayuanx
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-18Thread safe.ayuanx
PS: The OpenAL is a mess. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4710 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-13Code cleanup, removed extern declaration in sound streamsayuanx
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4688 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-13Add the mixer change from issue 1479 (use sleep(1) instead of cpu yield)Shawn Hoffman
Fix aram handling in wii mode - was doing strange things with aram AND mem2 space - only mem2 exists on wii. Let me know if this breaks anything... Fix Wii BS2 HLE - don't zero out bytes 6 and 7 Thanks to skidau for finding the ssbb error cause :) Fixes issue 303 Fixes issue 1479 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4687 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-12Improved XTra.KrazzY's Mute-On-Pause a bit, so it won't cost any CPU time ↵ayuanx
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-10Fixed annoying sound when pausing/shutting down (please test for ALL ↵XTra.KrazzY
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-11-27AlsaSound: Applied the fix from issue 1689 makes DSP betternakeee
thanks darumo git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4615 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-07LUAInterface should have all its functionality now (excluding ↵XTra.KrazzY
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-10-23CoreAudio for osx : replace all deprecated functions, now it not block ↵tmator
dolphin, but it not work, i'm not a sound specialist git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4457 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-15Pulse audio empty struct implementation. Working on it thoughnakeee
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4428 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-15Audio: alsa is now default on linux, scons switch openal off by default ↵nakeee
(openal=yes to enabled) minor clean up in audio config code git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4426 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-15Turns out that if one fails to use pkg-config to configure alsa, some other ↵Shawn Hoffman
ancient library gets linked in or something. - TD-Linux git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4424 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-30OpenCL: added opencl=true option to scons and fixed the case on the way.nakeee
Add ifdef for osx ocl include. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4348 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-24Add CoreAudio Backend, still needs a bit of work. Will cleanup ↵Sonicadvance1
AudioCommon.cpp, and finish off CoreAudioStream.cpp if I ever get running games working in Snow Leopard. Interpreter seems to run in to a spinlock, dunno why yet, and Jit just crashes out. Core problems is probably something I won't be able to fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4316 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-21fix some path issues on OSX, also libao for osx only supports ↵Shawn Hoffman
44.1kHz...awesome...who calls writing the CoreAudio backend so we can kill libao? :D git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4311 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-15DSP: added automatic alsa test.nakeee
Should fix issue 1403 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4274 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-09hopefully unbreak win32 build. yeah, this was sloppy of me :phrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4242 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-09Linux: Alsa backend for the audio plugins. Didn't succeed in reducing ↵hrydgard
latency though, but hopefully will work better than libao - shouldn't hang weirdly at underruns, I hope, like libao does. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4240 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-08get rid of the '¯' chars in source code...non ascii chars are not really ↵Shawn Hoffman
good to have floating around for no reason. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Non-ASCII_Characters#Non-ASCII_Characters git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4231 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-30set vcproj to unicode for everything except Core, Common, DiscIO, ↵LPFaint99
InputCommon, and Plugin_VideoDX9 and wxUSE_UNICODE set to 1 for wx git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3907 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28Now ALL copyright dates are fixed to the legally correct year: The year in ↵XTra.KrazzY
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-26Fix up all copyright dates.death2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3886 8ced0084-cf51-0410-be5f-012b33b47a6e