Games that have higher frequency sounds and music should sound a bit better using 48k.
I don't have any games that use DTKMusic so that upsampling code untested. If you get strange sounds only at 48k try toggling dtk music to see if that isolates the problem and let me know.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6383 8ced0084-cf51-0410-be5f-012b33b47a6e
Windows audio backend with lower latency.
Audio never glitches on my machine but the number of buffers may be set too aggressively. If you run into problems try turning up NUM_BUFFERS in the h file and leave some feedback.
From my tests games seem to prefer filling the buffer with smaller chunks. For this to work the callback that fills the buffer needs to either spin or run async so I went with async.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6371 8ced0084-cf51-0410-be5f-012b33b47a6e
This is the safe variant that does not assume other
functions use R11 for &g_dsp.r, which they actually do.
So there is a lot unnecessary reloading of the register
getting emitted.
There are a few small changes exploiting pointers known
at emission time and making use of MComplex math.
Also renames m_LLEplaying to m_AIplaying in Core/AudioCommon.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6245 8ced0084-cf51-0410-be5f-012b33b47a6e
This should eliminate the crackling with alsa and pulseaudio backends and replace it
with much nicer pauses. This is only interesting for audio backends that do not
respect Mixer::GetNumSamples() and should not impact users able to run the DSPLLE at
full speed.
The cost of this is an added LLE audio latency of about 0.06 s in the continuous
playback case. If that is too much, lower the low watermark.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6239 8ced0084-cf51-0410-be5f-012b33b47a6e
- First change is for Mixer.cpp, I've just re-added the functionality lost in r4724, so, if you disable audio throttle, games like donkey kong jungle beat, will work properly.
- Second change points to a doubt comment on UCode_Zelda_Voice.cpp, where it did not know here PB.NeedsReset came from. Well, the answer is it came from line 03b2 of the dumped Ucode, so when PB.IsBlanck equals to zero, PB.NeedsReset is zero too.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6100 8ced0084-cf51-0410-be5f-012b33b47a6e
Use SCons' convenient # shorthand for the root of our tree.
Also various minor cleanup of SConscripts.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5915 8ced0084-cf51-0410-be5f-012b33b47a6e
Move bits of HAVE_OPENCL/HAVE_WX for OS X from SConstruct to header files.
Use /usr/lib/libz on OS X now that we no longer have -L/opt/local/lib in
the library path. It is still possible that we could pick up a libz in
/usr/local/lib that would make the application non-redistributable, but
the danger is much less than previously.
Also bits of minor portability cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5868 8ced0084-cf51-0410-be5f-012b33b47a6e
identifying which options and parameters go with which platforms etc.
OS X, like Windows, now no longer uses Config.h. Configure() is still
used for the wx-config parameters, but that is a temporary measure.
Globals.cpp has never been used.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5860 8ced0084-cf51-0410-be5f-012b33b47a6e
frameworks on OS X.
Try to be a little clearer about which configuration options apply
to which platform(s). Should pave the way slightly for win32 scons.
We have accidentally been using LUA_USE_LINUX on OS X all along.
Turns out that LUA_USE_MACOSX is for an ancient version of OS X and
LUA_USE_LINUX is a reasonable set of defaults for modern Unices, so
just keep using that.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5804 8ced0084-cf51-0410-be5f-012b33b47a6e
for portability.
(It is a bit unfortunate that some of the plugins have a Config.h of
their own, which can confuse this matter.)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5795 8ced0084-cf51-0410-be5f-012b33b47a6e
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 8ced0084-cf51-0410-be5f-012b33b47a6e
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
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
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
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
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
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
. 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
. 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
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
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
2. When stopping, GUI doesn't let the user choose another game and effectively crash Dolphin
3. Omitted an unneeded loop in AudioCommon
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3552 8ced0084-cf51-0410-be5f-012b33b47a6e
Is there no indication from the game when the screen refresh should occur? No, not what I could find, we currently calculate the refresh rate and m_VBeamPos from the CPU ticks progress. That works perfectly if the CPU and GPU is perfectly synced as in the single core and no-idle skipping mode. So I guess it's possible that the game doesn't indicate when the screen should be refreshed, but rather that the hardware calculate that from the CPU ticks progress. That leaves us with a problem in the dual core and idle skipping modes to calculate a CPU-GPU synced CPU ticks progress.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3447 8ced0084-cf51-0410-be5f-012b33b47a6e
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