mirror of https://github.com/PCSX2/pcsx2.git
ZeroSPU2: Reformat zerospu2.cpp & h so that they are readable. Change a few unneccessary case statements into if statements.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@505 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
6ba8e669e7
commit
4531a1406f
|
@ -34,19 +34,13 @@ int AlsaSetupSound()
|
|||
snd_pcm_hw_params_t *hwparams;
|
||||
snd_pcm_sw_params_t *swparams;
|
||||
snd_pcm_status_t *status;
|
||||
unsigned int pspeed;
|
||||
int pchannels;
|
||||
snd_pcm_format_t format;
|
||||
unsigned int buffer_time, period_time;
|
||||
unsigned int pspeed = 48000;
|
||||
int pchannels = 2;
|
||||
snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE;
|
||||
unsigned int buffer_time = SOUNDSIZE;
|
||||
unsigned int period_time= buffer_time / 4;
|
||||
int err;
|
||||
|
||||
pchannels=2;
|
||||
|
||||
pspeed = 48000;
|
||||
format = SND_PCM_FORMAT_S16_LE;
|
||||
buffer_time = SOUNDSIZE;
|
||||
period_time = buffer_time / 4;
|
||||
|
||||
err = snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
|
||||
if(err < 0) {
|
||||
printf("Audio open error: %s\n", snd_strerror(err));
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -148,6 +148,29 @@ extern __forceinline void pcsx2_aligned_free(void* pmem)
|
|||
|
||||
#endif
|
||||
|
||||
// Atomic Operations
|
||||
#if defined (_WIN32)
|
||||
|
||||
#ifndef __x86_64__
|
||||
extern "C" LONG __cdecl _InterlockedExchangeAdd(LPLONG volatile Addend, LONG Value);
|
||||
#endif
|
||||
|
||||
#pragma intrinsic (_InterlockedExchangeAdd)
|
||||
#define InterlockedExchangeAdd _InterlockedExchangeAdd
|
||||
|
||||
#else
|
||||
|
||||
typedef void* PVOID;
|
||||
|
||||
__forceinline long InterlockedExchangeAdd(long volatile* Addend, long Value)
|
||||
{
|
||||
__asm__ __volatile__(".intel_syntax\n"
|
||||
"lock xadd [%0], %%eax\n"
|
||||
".att_syntax\n" : : "r"(Addend), "a"(Value) : "memory" );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////
|
||||
// SPU2 Registers //
|
||||
////////////////////
|
||||
|
|
Loading…
Reference in New Issue