diff options
| author | skidau <skidau@gmail.com> | 2013-03-27 13:19:23 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2013-03-27 13:19:23 +1100 |
| commit | 7784fa4c67cc8d2545f45694d83805e7e89cd583 (patch) | |
| tree | 7724133aabe971ec417d1dea0977a525bb8debfb /Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | |
| parent | d33c19b0cd2bae982c8d35e86a9d3551f9e5c72f (diff) | |
| parent | 5cea0d9defeaa23e7af94adf7615a44fb2c9c173 (diff) | |
Merge branch 'master' into wii-network
# By Ryan Houdek (185) and others
# Via degasus (12) and others
* master: (625 commits)
Revert "Don't open/close file for every file operation." as it was crashing PokePark in Windows builds.
Array overrun fixed in VertexShaderCache for the DX11 plugin.
Fixed DSPTool build.
Windows build fix
Go back to assuming every HID device is a wiimote on Windows. Fixed issue 6117. Unfixed issue 6031.
VideoSoftware: Improve fog range adjustment by using less magic and more comments.
revert RasterFont for VideoSoftware
ogl: fix virtual xfb
Windows build fix from web interface...
Adjusted the audio loop criteria, using >= on the Wii and == on GC. This fixes the audio static that occurred in Wii games after hours of play.
Forced the exception check only for ARAM DMA transfers. Removed the Eternal Darkness boot hack and replaced it with an exception check.
VideoSoftware: Implement fog range adjustment, fixing issue 6147.
implement 4xSSAA for OGL
move ogl-only settings into backend
Fix description of disable fog, and move it to enhancements tab.
Reverted rd76ca5783743 as it was made obsolete by r1d550f4496e4.
Removed the tracking of the FIFO Writes as it was made obsolete by r1d550f4496e4.
Forced the external exception check to occur sooner by changing the downcount.
Mark the Direct3D9 backend deprecated.
Prefer D3D11 and OpenGL over D3D9 by default.
...
Conflicts:
CMakeLists.txt
Source/Core/Common/Common.vcxproj.filters
Source/Core/Common/Src/CommonPaths.h
Source/Core/Core/Core.vcxproj.filters
Source/Core/Core/Src/Core.cpp
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
Source/VSProps/Dolphin.Win32.props
Source/VSProps/Dolphin.x64.props
Diffstat (limited to 'Source/Core/AudioCommon/Src/AlsaSoundStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp index 710275d55a..d9b9016114 100644 --- a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp @@ -88,7 +88,7 @@ bool AlsaSound::AlsaInit() snd_pcm_hw_params_t *hwparams; snd_pcm_uframes_t buffer_size,buffer_size_max; unsigned int periods; - + err = snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0); if (err < 0) { @@ -97,7 +97,7 @@ bool AlsaSound::AlsaInit() } snd_pcm_hw_params_alloca(&hwparams); - + err = snd_pcm_hw_params_any(handle, hwparams); if (err < 0) { @@ -111,8 +111,8 @@ bool AlsaSound::AlsaInit() ERROR_LOG(AUDIO, "Access type not available: %s\n", snd_strerror(err)); return false; } - - err = snd_pcm_hw_params_set_format(handle, hwparams, SND_PCM_FORMAT_S16_LE); + + err = snd_pcm_hw_params_set_format(handle, hwparams, SND_PCM_FORMAT_S16_LE); if (err < 0) { ERROR_LOG(AUDIO, "Sample format not available: %s\n", snd_strerror(err)); @@ -126,14 +126,14 @@ bool AlsaSound::AlsaInit() ERROR_LOG(AUDIO, "Rate not available: %s\n", snd_strerror(err)); return false; } - - err = snd_pcm_hw_params_set_channels(handle, hwparams, 2); + + err = snd_pcm_hw_params_set_channels(handle, hwparams, 2); if (err < 0) { ERROR_LOG(AUDIO, "Channels count not available: %s\n", snd_strerror(err)); return false; } - + periods = BUFFER_SIZE_MAX / FRAME_COUNT_MIN; err = snd_pcm_hw_params_set_periods_max(handle, hwparams, &periods, &dir); if (err < 0) @@ -153,10 +153,10 @@ bool AlsaSound::AlsaInit() err = snd_pcm_hw_params(handle, hwparams); if (err < 0) { - ERROR_LOG(AUDIO, "Unable to install hw params: %s\n", snd_strerror(err)); + ERROR_LOG(AUDIO, "Unable to install hw params: %s\n", snd_strerror(err)); return false; } - + err = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size); if (err < 0) { @@ -176,10 +176,10 @@ bool AlsaSound::AlsaInit() frames_to_deliver = buffer_size / periods; //limit the minimum size. pulseaudio advertises a minimum of 32 samples. if (frames_to_deliver < FRAME_COUNT_MIN) - frames_to_deliver = FRAME_COUNT_MIN; + frames_to_deliver = FRAME_COUNT_MIN; //it is probably a bad idea to try to send more than one buffer of data if ((unsigned int)frames_to_deliver > buffer_size) - frames_to_deliver = buffer_size; + frames_to_deliver = buffer_size; NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d samples per fragments.\n", buffer_size, periods, frames_to_deliver); snd_pcm_sw_params_alloca(&swparams); @@ -187,21 +187,21 @@ bool AlsaSound::AlsaInit() err = snd_pcm_sw_params_current(handle, swparams); if (err < 0) { - ERROR_LOG(AUDIO, "cannot init sw params: %s\n", snd_strerror(err)); + ERROR_LOG(AUDIO, "cannot init sw params: %s\n", snd_strerror(err)); return false; } - + err = snd_pcm_sw_params_set_start_threshold(handle, swparams, 0U); if (err < 0) { - ERROR_LOG(AUDIO, "cannot set start thresh: %s\n", snd_strerror(err)); + ERROR_LOG(AUDIO, "cannot set start thresh: %s\n", snd_strerror(err)); return false; } - + err = snd_pcm_sw_params(handle, swparams); if (err < 0) { - ERROR_LOG(AUDIO, "cannot set sw params: %s\n", snd_strerror(err)); + ERROR_LOG(AUDIO, "cannot set sw params: %s\n", snd_strerror(err)); return false; } |
