From ec65fc0338ed98c756b0ead0dec0cfe841aa7b64 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 Aug 2011 13:26:02 -0700 Subject: [PATCH] Rename getALError/getALCError to checkALError/checkALCError --- buffer.c | 80 ++++++++++++++++++++++++++++---------------------------- dsound_private.h | 77 +++++++++++++++++++++++++---------------------------- primary.c | 50 +++++++++++++++++------------------ 3 files changed, 101 insertions(+), 106 deletions(-) diff --git a/buffer.c b/buffer.c index b8c0b20acb4..782e4136595 100644 --- a/buffer.c +++ b/buffer.c @@ -130,7 +130,7 @@ static void DS8Buffer_starttimer(DS8Primary *prim) timeGetDevCaps(&time, sizeof(TIMECAPS)); alcGetIntegerv(prim->parent->device, ALC_REFRESH, 1, &refresh); - getALCError(prim->parent->device); + checkALCError(prim->parent->device); triggertime = 1000 / refresh / 2; if(triggertime < time.wPeriodMin) @@ -710,7 +710,7 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar ALuint newSize; alcGetIntegerv(prim->parent->device, ALC_REFRESH, 1, &refresh); - getALCError(prim->parent->device); + checkALCError(prim->parent->device); newSize = format->nAvgBytesPerSec/refresh + format->nBlockAlign - 1; newSize -= newSize%format->nBlockAlign; @@ -810,7 +810,7 @@ static HRESULT DS8Data_Create(DS8Data **ppv, const DSBUFFERDESC *desc, DS8Primar goto fail; alGenBuffers(pBuffer->numsegs, pBuffer->buffers); - getALError(); + checkALError(); *ppv = pBuffer; return S_OK; @@ -834,7 +834,7 @@ static void DS8Data_Release(DS8Data *This) if (This->buffers && This->buffers[0]) { alDeleteBuffers(This->numsegs, This->buffers); - getALError(); + checkALError(); } HeapFree(GetProcessHeap(), 0, This->buffers); HeapFree(GetProcessHeap(), 0, This->data); @@ -930,7 +930,7 @@ void DS8Buffer_Destroy(DS8Buffer *This) alSourceStop(This->source); alSourcei(This->source, AL_BUFFER, 0); - getALError(); + checkALError(); sources = prim->sources; if(prim->nsources == prim->sizesources) @@ -1059,7 +1059,7 @@ static HRESULT WINAPI DS8Buffer_GetCurrentPosition(IDirectSoundBuffer8 *iface, D { ALint queued = QBUFFERS; alGetSourcei(This->source, AL_BUFFERS_QUEUED, &queued); - getALError(); + checkALError(); pos = (This->curidx+This->buffer->numsegs-queued)%This->buffer->numsegs; pos *= This->buffer->segsize; @@ -1071,7 +1071,7 @@ static HRESULT WINAPI DS8Buffer_GetCurrentPosition(IDirectSoundBuffer8 *iface, D ALint rwpos[2] = { 0, 0 }; alGetSourceiv(This->source, AL_BYTE_RW_OFFSETS_SOFT, rwpos); - getALError(); + checkALError(); pos = rwpos[0]; writecursor = rwpos[1]; @@ -1083,7 +1083,7 @@ static HRESULT WINAPI DS8Buffer_GetCurrentPosition(IDirectSoundBuffer8 *iface, D alGetSourcei(This->source, AL_BYTE_OFFSET, &ofs); alGetSourcei(This->source, AL_SOURCE_STATE, &status); - getALError(); + checkALError(); pos = ofs; if(status == AL_PLAYING) @@ -1166,7 +1166,7 @@ static HRESULT WINAPI DS8Buffer_GetVolume(IDirectSoundBuffer8 *iface, LONG *vol) setALContext(This->ctx); alGetSourcef(This->source, AL_GAIN, &gain); - getALError(); + checkALError(); popALContext(); *vol = clampI(gain_to_mB(gain), DSBVOLUME_MIN, DSBVOLUME_MAX); @@ -1198,7 +1198,7 @@ static HRESULT WINAPI DS8Buffer_GetPan(IDirectSoundBuffer8 *iface, LONG *pan) setALContext(This->ctx); alGetSourcefv(This->source, AL_POSITION, pos); - getALError(); + checkALError(); popALContext(); *pan = clampI(((pos[0]+1.0) * (DSBPAN_RIGHT-DSBPAN_LEFT) / 2.0 + 0.5) + DSBPAN_LEFT, DSBPAN_LEFT, DSBPAN_RIGHT); @@ -1230,7 +1230,7 @@ static HRESULT WINAPI DS8Buffer_GetFrequency(IDirectSoundBuffer8 *iface, DWORD * setALContext(This->ctx); alGetSourcefv(This->source, AL_PITCH, &pitch); - getALError(); + checkALError(); popALContext(); *freq = (DWORD)(This->buffer->format.Format.nSamplesPerSec * pitch); @@ -1262,7 +1262,7 @@ static HRESULT WINAPI DS8Buffer_GetStatus(IDirectSoundBuffer8 *iface, DWORD *sta alGetSourcei(This->source, AL_LOOPING, &looping); else if(state != AL_PLAYING) state = This->isplaying ? AL_PLAYING : AL_PAUSED; - getALError(); + checkALError(); popALContext(); LeaveCriticalSection(This->crst); @@ -1347,7 +1347,7 @@ static HRESULT WINAPI DS8Buffer_Initialize(IDirectSoundBuffer8 *iface, IDirectSo buf->data, buf->buf_size, buf->format.Format.nSamplesPerSec); } - getALError(); + checkALError(); } hr = DSERR_GENERIC; @@ -1356,7 +1356,7 @@ static HRESULT WINAPI DS8Buffer_Initialize(IDirectSoundBuffer8 *iface, IDirectSo This->source = This->primary->sources[--This->primary->nsources]; alSourcef(This->source, AL_GAIN, 1.0f); alSourcef(This->source, AL_PITCH, 1.0f); - getALError(); + checkALError(); } else { @@ -1388,7 +1388,7 @@ static HRESULT WINAPI DS8Buffer_Initialize(IDirectSoundBuffer8 *iface, IDirectSo if(This->primary->auxslot != 0) { alSource3i(This->source, AL_AUXILIARY_SEND_FILTER, This->primary->auxslot, 0, AL_FILTER_NULL); - getALError(); + checkALError(); } hr = IDirectSound3DBuffer_SetAllParameters(&This->IDirectSound3DBuffer_iface, ds3dbuffer, DS3D_IMMEDIATE); @@ -1421,7 +1421,7 @@ static HRESULT WINAPI DS8Buffer_Initialize(IDirectSoundBuffer8 *iface, IDirectSo alSourcei(source, AL_CONE_INNER_ANGLE, 360); alSourcei(source, AL_CONE_OUTER_ANGLE, 360); alSourcei(source, AL_SOURCE_RELATIVE, AL_TRUE); - getALError(); + checkALError(); } hr = S_OK; @@ -1539,7 +1539,7 @@ static HRESULT WINAPI DS8Buffer_Play(IDirectSoundBuffer8 *iface, DWORD res1, DWO alGetSourcei(This->source, AL_SOURCE_TYPE, &type); alSourcei(This->source, AL_LOOPING, (flags&DSBPLAY_LOOPING) ? AL_TRUE : AL_FALSE); } - getALError(); + checkALError(); hr = S_OK; if(state == AL_PLAYING) @@ -1557,7 +1557,7 @@ static HRESULT WINAPI DS8Buffer_Play(IDirectSoundBuffer8 *iface, DWORD res1, DWO ERR("Couldn't start source\n"); This->curidx = (This->buffer->numsegs-1+This->curidx)%This->buffer->numsegs; alSourcei(This->source, AL_BUFFER, 0); - getALError(); + checkALError(); hr = DSERR_GENERIC; goto out; } @@ -1601,7 +1601,7 @@ static HRESULT WINAPI DS8Buffer_SetCurrentPosition(IDirectSoundBuffer8 *iface, D * proper position */ alSourceStop(This->source); alSourcei(This->source, AL_BUFFER, 0); - getALError(); + checkALError(); popALContext(); } } @@ -1677,7 +1677,7 @@ static HRESULT WINAPI DS8Buffer_SetPan(IDirectSoundBuffer8 *iface, LONG pan) setALContext(This->ctx); alSourcefv(This->source, AL_POSITION, pos); - getALError(); + checkALError(); popALContext(); if(pan != 0 && This->buffer->format.Format.nChannels > 1) @@ -1710,7 +1710,7 @@ static HRESULT WINAPI DS8Buffer_SetFrequency(IDirectSoundBuffer8 *iface, DWORD f setALContext(This->ctx); alSourcef(This->source, AL_PITCH, pitch); - getALError(); + checkALError(); popALContext(); } @@ -1728,7 +1728,7 @@ static HRESULT WINAPI DS8Buffer_Stop(IDirectSoundBuffer8 *iface) setALContext(This->ctx); alSourcePause(This->source); - getALError(); + checkALError(); /* Mac OS X doesn't immediately report state change * if Play() is immediately called after Stop, this can be fatal, * the buffer would never be restarted @@ -1804,7 +1804,7 @@ static HRESULT WINAPI DS8Buffer_Unlock(IDirectSoundBuffer8 *iface, void *ptr1, D if(len2 > 0) This->ExtAL->BufferSubSamplesSOFT(buf->buffers[0], ofs2, len2, buf->in_chans, buf->in_type, ptr2); - getALError(); + checkALError(); } else if(This->primary->SupportedExt[SOFT_BUFFER_SUB_DATA]) { @@ -1818,14 +1818,14 @@ static HRESULT WINAPI DS8Buffer_Unlock(IDirectSoundBuffer8 *iface, void *ptr1, D if(len2 > 0) This->ExtAL->BufferSubData(buf->buffers[0], buf->buf_format, ptr2, ofs2, len2); - getALError(); + checkALError(); } else { alBufferData(buf->buffers[0], buf->buf_format, buf->data, buf->buf_size, buf->format.Format.nSamplesPerSec); - getALError(); + checkALError(); } popALContext(); @@ -2199,7 +2199,7 @@ static HRESULT WINAPI DS8Buffer3D_GetConeAngles(IDirectSound3DBuffer *iface, DWO alGetSourcei(This->source, AL_CONE_INNER_ANGLE, &inangle); alGetSourcei(This->source, AL_CONE_OUTER_ANGLE, &outangle); - getALError(); + checkALError(); *pdwInsideConeAngle = inangle; *pdwOutsideConeAngle = outangle; @@ -2225,7 +2225,7 @@ static HRESULT WINAPI DS8Buffer3D_GetConeOrientation(IDirectSound3DBuffer *iface setALContext(This->ctx); alGetSourcefv(This->source, AL_DIRECTION, dir); - getALError(); + checkALError(); orient->x = dir[0]; orient->y = dir[1]; orient->z = -dir[2]; @@ -2252,7 +2252,7 @@ static HRESULT WINAPI DS8Buffer3D_GetConeOutsideVolume(IDirectSound3DBuffer *ifa setALContext(This->ctx); alGetSourcef(This->source, AL_CONE_OUTER_GAIN, &gain); - getALError(); + checkALError(); popALContext(); LeaveCriticalSection(This->crst); @@ -2277,7 +2277,7 @@ static HRESULT WINAPI DS8Buffer3D_GetMaxDistance(IDirectSound3DBuffer *iface, D3 setALContext(This->ctx); alGetSourcef(This->source, AL_MAX_DISTANCE, &dist); - getALError(); + checkALError(); popALContext(); LeaveCriticalSection(This->crst); @@ -2302,7 +2302,7 @@ static HRESULT WINAPI DS8Buffer3D_GetMinDistance(IDirectSound3DBuffer *iface, D3 setALContext(This->ctx); alGetSourcef(This->source, AL_REFERENCE_DISTANCE, &dist); - getALError(); + checkALError(); *mindist = dist; popALContext(); @@ -2345,7 +2345,7 @@ static HRESULT WINAPI DS8Buffer3D_GetPosition(IDirectSound3DBuffer *iface, D3DVE setALContext(This->ctx); alGetSourcefv(This->source, AL_POSITION, alpos); - getALError(); + checkALError(); pos->x = alpos[0]; pos->y = alpos[1]; pos->z = -alpos[2]; @@ -2372,7 +2372,7 @@ static HRESULT WINAPI DS8Buffer3D_GetVelocity(IDirectSound3DBuffer *iface, D3DVE setALContext(This->ctx); alGetSourcefv(This->source, AL_VELOCITY, alvel); - getALError(); + checkALError(); vel->x = alvel[0]; vel->y = alvel[1]; vel->z = -alvel[2]; @@ -2469,7 +2469,7 @@ static HRESULT WINAPI DS8Buffer3D_SetConeAngles(IDirectSound3DBuffer *iface, DWO setALContext(This->ctx); alSourcei(This->source, AL_CONE_INNER_ANGLE, dwInsideConeAngle); alSourcei(This->source, AL_CONE_OUTER_ANGLE, dwOutsideConeAngle); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2495,7 +2495,7 @@ static HRESULT WINAPI DS8Buffer3D_SetConeOrientation(IDirectSound3DBuffer *iface { setALContext(This->ctx); alSource3f(This->source, AL_DIRECTION, x, y, -z); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2524,7 +2524,7 @@ static HRESULT WINAPI DS8Buffer3D_SetConeOutsideVolume(IDirectSound3DBuffer *ifa { setALContext(This->ctx); alSourcef(This->source, AL_CONE_OUTER_GAIN, mB_to_gain(vol)); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2553,7 +2553,7 @@ static HRESULT WINAPI DS8Buffer3D_SetMaxDistance(IDirectSound3DBuffer *iface, D3 { setALContext(This->ctx); alSourcef(This->source, AL_MAX_DISTANCE, maxdist); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2582,7 +2582,7 @@ static HRESULT WINAPI DS8Buffer3D_SetMinDistance(IDirectSound3DBuffer *iface, D3 { setALContext(This->ctx); alSourcef(This->source, AL_REFERENCE_DISTANCE, mindist); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2616,7 +2616,7 @@ static HRESULT WINAPI DS8Buffer3D_SetMode(IDirectSound3DBuffer *iface, DWORD mod alSourcef(This->source, AL_ROLLOFF_FACTOR, (mode == DS3DMODE_DISABLE) ? 0.0f : This->primary->rollofffactor); This->ds3dmode = mode; - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2642,7 +2642,7 @@ static HRESULT WINAPI DS8Buffer3D_SetPosition(IDirectSound3DBuffer *iface, D3DVA { setALContext(This->ctx); alSource3f(This->source, AL_POSITION, x, y, -z); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); @@ -2668,7 +2668,7 @@ static HRESULT WINAPI DS8Buffer3D_SetVelocity(IDirectSound3DBuffer *iface, D3DVA { setALContext(This->ctx); alSource3f(This->source, AL_VELOCITY, x, y, -z); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(This->crst); diff --git a/dsound_private.h b/dsound_private.h index 0273be03412..e6cd6fdbbde 100644 --- a/dsound_private.h +++ b/dsound_private.h @@ -551,57 +551,52 @@ static inline FLOAT clampF(FLOAT val, FLOAT minval, FLOAT maxval) } -#define getALError() \ -do { \ - ALenum err = alGetError(); \ - if(err != AL_NO_ERROR) \ - ERR(">>>>>>>>>>>> Received AL error %#x on context %p, %s:%u\n", err, get_context(), __FUNCTION__, __LINE__); \ +#define checkALError() do { \ + ALenum err = alGetError(); \ + if(err != AL_NO_ERROR) \ + ERR(">>>>>>>>>>>> Received AL error %#x on context %p, %s:%u\n", \ + err, get_context(), __FUNCTION__, __LINE__); \ } while (0) -#define getALCError(dev) \ -do { \ - ALenum err = alcGetError(dev); \ - if(err != ALC_NO_ERROR) \ - ERR(">>>>>>>>>>>> Received ALC error %#x on device %p, %s:%u\n", err, dev, __FUNCTION__, __LINE__); \ +#define checkALCError(dev) do { \ + ALenum err = alcGetError(dev); \ + if(err != ALC_NO_ERROR) \ + ERR(">>>>>>>>>>>> Received ALC error %#x on device %p, %s:%u\n", \ + err, dev, __FUNCTION__, __LINE__); \ } while(0) #if ALLOW_CONCURRENT_AL -#define setALContext(actx) \ - do { \ - ALCcontext *__old_ctx, *cur_ctx = actx; \ - if (!local_contexts) EnterCriticalSection(&openal_crst); \ - __old_ctx = get_context(); \ - if (__old_ctx != cur_ctx && set_context(cur_ctx) == ALC_FALSE) {\ - ERR("Couldn't set current context!!\n"); \ - getALCError(alcGetContextsDevice(cur_ctx)); \ - } - +#define setALContext(actx) do { \ + ALCcontext *__old_ctx, *cur_ctx = actx; \ + if(!local_contexts) EnterCriticalSection(&openal_crst); \ + __old_ctx = get_context(); \ + if(__old_ctx != cur_ctx && set_context(cur_ctx) == ALC_FALSE) { \ + ERR("Couldn't set current context!!\n"); \ + checkALCError(alcGetContextsDevice(cur_ctx)); \ + } /* Only restore a NULL context if using global contexts, for TLS contexts always restore */ -#define popALContext() \ - if (__old_ctx != cur_ctx && \ - (local_contexts || __old_ctx) && \ - set_context(__old_ctx) == ALC_FALSE) { \ - ERR("Couldn't restore old context!!\n"); \ - getALCError(alcGetContextsDevice(__old_ctx)); \ - } \ - if (!local_contexts) LeaveCriticalSection(&openal_crst); \ - } while (0) +#define popALContext() \ + if(__old_ctx != cur_ctx && (local_contexts || __old_ctx) && \ + set_context(__old_ctx) == ALC_FALSE) { \ + ERR("Couldn't restore old context!!\n"); \ + checkALCError(alcGetContextsDevice(__old_ctx)); \ + } \ + if (!local_contexts) LeaveCriticalSection(&openal_crst); \ +} while(0) #else -#define setALContext(actx) \ - do { \ - ALCcontext *cur_ctx = actx; \ - if (!local_contexts) EnterCriticalSection(&openal_crst); \ - if (set_context(cur_ctx) == ALC_FALSE) { \ - ERR("Couldn't set current context!!\n"); \ - getALCError(alcGetContextsDevice(cur_ctx)); \ - } - -#define popALContext() \ - if (!local_contexts) LeaveCriticalSection(&openal_crst); \ - } while (0) +#define setALContext(actx) do { \ + ALCcontext *cur_ctx = actx; \ + if(!local_contexts) EnterCriticalSection(&openal_crst); \ + if(set_context(cur_ctx) == ALC_FALSE) { \ + ERR("Couldn't set current context!!\n"); \ + checkALCError(alcGetContextsDevice(cur_ctx)); \ + } +#define popALContext() \ + if (!local_contexts) LeaveCriticalSection(&openal_crst); \ +} while (0) #endif diff --git a/primary.c b/primary.c index e6101ede31e..819aabc3535 100644 --- a/primary.c +++ b/primary.c @@ -182,8 +182,8 @@ static DWORD CALLBACK ThreadProc(void *dwUser) } alSourcePlay(buf->source); } - getALError(); } + checkALError(); } for(i = 0;i < prim->nnotifies;) @@ -375,7 +375,7 @@ HRESULT DS8Primary_Create(DS8Primary **ppv, DS8Impl *parent) break; } alDeleteSources(nsources, srcs); - getALError(); + checkALError(); popALContext(); @@ -596,7 +596,7 @@ static HRESULT WINAPI DS8Primary_GetVolume(IDirectSoundBuffer *iface, LONG *volu setALContext(This->ctx); alGetListenerf(AL_GAIN, &gain); - getALError(); + checkALError(); popALContext(); *volume = clampI(gain_to_mB(gain), DSBVOLUME_MIN, DSBVOLUME_MAX); @@ -891,7 +891,7 @@ static HRESULT WINAPI DS8Primary_SetFormat(IDirectSoundBuffer *iface, const WAVE freq = This->format.Format.nSamplesPerSec; alcGetIntegerv(This->parent->device, ALC_FREQUENCY, 1, &freq); - getALCError(This->parent->device); + checkALCError(This->parent->device); This->format.Format.nSamplesPerSec = freq; This->format.Format.nAvgBytesPerSec = This->format.Format.nBlockAlign * @@ -1143,7 +1143,7 @@ static HRESULT WINAPI DS8Primary3D_GetDistanceFactor(IDirectSound3DListener *ifa setALContext(This->ctx); *distancefactor = 343.3f/alGetFloat(AL_SPEED_OF_SOUND); - getALError(); + checkALError(); popALContext(); LeaveCriticalSection(&This->crst); @@ -1167,7 +1167,7 @@ static HRESULT WINAPI DS8Primary3D_GetDopplerFactor(IDirectSound3DListener *ifac setALContext(This->ctx); *dopplerfactor = alGetFloat(AL_DOPPLER_FACTOR); - getALError(); + checkALError(); popALContext(); LeaveCriticalSection(&This->crst); @@ -1192,7 +1192,7 @@ static HRESULT WINAPI DS8Primary3D_GetOrientation(IDirectSound3DListener *iface, setALContext(This->ctx); alGetListenerfv(AL_ORIENTATION, orient); - getALError(); + checkALError(); front->x = orient[0]; front->y = orient[1]; @@ -1224,7 +1224,7 @@ static HRESULT WINAPI DS8Primary3D_GetPosition(IDirectSound3DListener *iface, D3 setALContext(This->ctx); alGetListenerfv(AL_POSITION, alpos); - getALError(); + checkALError(); pos->x = alpos[0]; pos->y = alpos[1]; @@ -1272,7 +1272,7 @@ static HRESULT WINAPI DS8Primary3D_GetVelocity(IDirectSound3DListener *iface, D3 setALContext(This->ctx); alGetListenerfv(AL_VELOCITY, vel); - getALError(); + checkALError(); velocity->x = vel[0]; velocity->y = vel[1]; @@ -1357,7 +1357,7 @@ static HRESULT WINAPI DS8Primary3D_SetDistanceFactor(IDirectSound3DListener *ifa alSpeedOfSound(343.3f/factor); if(This->SupportedExt[EXT_EFX]) alListenerf(AL_METERS_PER_UNIT, factor); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(&This->crst); @@ -1388,7 +1388,7 @@ static HRESULT WINAPI DS8Primary3D_SetDopplerFactor(IDirectSound3DListener *ifac { setALContext(This->ctx); alDopplerFactor(factor); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(&This->crst); @@ -1421,7 +1421,7 @@ static HRESULT WINAPI DS8Primary3D_SetOrientation(IDirectSound3DListener *iface, }; setALContext(This->ctx); alListenerfv(AL_ORIENTATION, orient); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(&This->crst); @@ -1447,7 +1447,7 @@ static HRESULT WINAPI DS8Primary3D_SetPosition(IDirectSound3DListener *iface, D3 { setALContext(This->ctx); alListener3f(AL_POSITION, x, y, -z); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(&This->crst); @@ -1484,7 +1484,7 @@ static HRESULT WINAPI DS8Primary3D_SetRolloffFactor(IDirectSound3DListener *ifac if(This->buffers[i]->ds3dmode != DS3DMODE_DISABLE) alSourcef(This->buffers[i]->source, AL_ROLLOFF_FACTOR, factor); } - getALError(); + checkALError(); popALContext(); This->rollofffactor = factor; @@ -1512,7 +1512,7 @@ static HRESULT WINAPI DS8Primary3D_SetVelocity(IDirectSound3DListener *iface, D3 { setALContext(This->ctx); alListener3f(AL_VELOCITY, x, y, -z); - getALError(); + checkALError(); popALContext(); } LeaveCriticalSection(&This->crst); @@ -1566,8 +1566,8 @@ static HRESULT WINAPI DS8Primary3D_CommitDeferredSettings(IDirectSound3DListener if(This->dirty.bit.effect) This->ExtAL.AuxiliaryEffectSloti(This->auxslot, AL_EFFECTSLOT_EFFECT, This->effect); - /* getALError is here for debugging */ - getALError(); + /* checkALError is here for debugging */ + checkALError(); TRACE("Dirty flags was: 0x%02x\n", This->dirty.flags); This->dirty.flags = 0; @@ -1618,7 +1618,7 @@ static HRESULT WINAPI DS8Primary3D_CommitDeferredSettings(IDirectSound3DListener } buf->dirty.flags = 0; } - getALError(); + checkALError(); This->ProcessUpdates(); popALContext(); @@ -1924,7 +1924,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, (data.props->dwFlags&EAXLISTENERFLAGS_DECAYHFLIMIT) ? AL_TRUE : AL_FALSE); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -1943,7 +1943,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->eax_prop.lRoom = *data.l; This->ExtAL.Effectf(This->effect, AL_REVERB_GAIN, mB_to_gain(This->eax_prop.lRoom)); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -1961,7 +1961,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->eax_prop.lRoomHF = *data.l; This->ExtAL.Effectf(This->effect, AL_REVERB_GAINHF, mB_to_gain(This->eax_prop.lRoomHF)); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -1980,7 +1980,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->eax_prop.flRoomRolloffFactor = *data.fl; This->ExtAL.Effectf(This->effect, AL_REVERB_ROOM_ROLLOFF_FACTOR, This->eax_prop.flRoomRolloffFactor); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -2069,7 +2069,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->eax_prop.flEnvironmentDiffusion = *data.fl; This->ExtAL.Effectf(This->effect, AL_REVERB_DIFFUSION, This->eax_prop.flEnvironmentDiffusion); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -2088,7 +2088,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->eax_prop.flAirAbsorptionHF = *data.fl; This->ExtAL.Effectf(This->effect, AL_REVERB_AIR_ABSORPTION_GAINHF, mB_to_gain(This->eax_prop.flAirAbsorptionHF)); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; @@ -2108,7 +2108,7 @@ static HRESULT WINAPI DS8PrimaryProp_Set(IKsPropertySet *iface, This->ExtAL.Effecti(This->effect, AL_REVERB_DECAY_HFLIMIT, (This->eax_prop.dwFlags&EAXLISTENERFLAGS_DECAYHFLIMIT) ? AL_TRUE : AL_FALSE); - getALError(); + checkALError(); This->dirty.bit.effect = 1; res = DS_OK; -- 2.11.4.GIT