Remove hungarian notation from the device and context structs
This commit is contained in:
@@ -1388,8 +1388,8 @@ static ALCvoid FreeDevice(ALCdevice *device)
|
||||
free(device->Bs2b);
|
||||
device->Bs2b = NULL;
|
||||
|
||||
free(device->szDeviceName);
|
||||
device->szDeviceName = NULL;
|
||||
free(device->DeviceName);
|
||||
device->DeviceName = NULL;
|
||||
|
||||
DeleteCriticalSection(&device->Mutex);
|
||||
|
||||
@@ -1476,7 +1476,7 @@ static ALvoid InitContext(ALCcontext *pContext)
|
||||
pContext->SourceDistanceModel = AL_FALSE;
|
||||
pContext->DopplerFactor = 1.0f;
|
||||
pContext->DopplerVelocity = 1.0f;
|
||||
pContext->flSpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
|
||||
pContext->SpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
|
||||
pContext->DeferUpdates = AL_FALSE;
|
||||
|
||||
pContext->ExtensionList = alExtList;
|
||||
@@ -1680,7 +1680,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
|
||||
InitUIntMap(&device->EffectMap, ~0);
|
||||
InitUIntMap(&device->FilterMap, ~0);
|
||||
|
||||
device->szDeviceName = NULL;
|
||||
device->DeviceName = NULL;
|
||||
|
||||
device->Flags |= DEVICE_FREQUENCY_REQUEST;
|
||||
device->Frequency = frequency;
|
||||
@@ -1878,7 +1878,7 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *pDevice,ALCenum para
|
||||
case ALC_ALL_DEVICES_SPECIFIER:
|
||||
if(VerifyDevice(pDevice))
|
||||
{
|
||||
value = pDevice->szDeviceName;
|
||||
value = pDevice->DeviceName;
|
||||
ALCdevice_DecRef(pDevice);
|
||||
}
|
||||
else
|
||||
@@ -1891,7 +1891,7 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *pDevice,ALCenum para
|
||||
case ALC_CAPTURE_DEVICE_SPECIFIER:
|
||||
if(VerifyDevice(pDevice))
|
||||
{
|
||||
value = pDevice->szDeviceName;
|
||||
value = pDevice->DeviceName;
|
||||
ALCdevice_DecRef(pDevice);
|
||||
}
|
||||
else
|
||||
@@ -2466,7 +2466,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
||||
device->Flags = 0;
|
||||
device->Bs2b = NULL;
|
||||
device->Bs2bLevel = 0;
|
||||
device->szDeviceName = NULL;
|
||||
device->DeviceName = NULL;
|
||||
|
||||
device->ContextList = NULL;
|
||||
|
||||
@@ -2650,7 +2650,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
||||
device->next = DeviceList;
|
||||
} while(!CompExchangePtr((XchgPtr*)&DeviceList, device->next, device));
|
||||
|
||||
TRACE("Created device %p, \"%s\"\n", device, device->szDeviceName);
|
||||
TRACE("Created device %p, \"%s\"\n", device, device->DeviceName);
|
||||
return device;
|
||||
}
|
||||
|
||||
@@ -2730,7 +2730,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
|
||||
device->Flags = 0;
|
||||
device->Bs2b = NULL;
|
||||
device->Bs2bLevel = 0;
|
||||
device->szDeviceName = NULL;
|
||||
device->DeviceName = NULL;
|
||||
|
||||
device->ContextList = NULL;
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
||||
|
||||
//Get context properties
|
||||
DopplerFactor = ALContext->DopplerFactor * ALSource->DopplerFactor;
|
||||
SpeedOfSound = ALContext->flSpeedOfSound * ALContext->DopplerVelocity;
|
||||
SpeedOfSound = ALContext->SpeedOfSound * ALContext->DopplerVelocity;
|
||||
NumSends = Device->NumAuxSends;
|
||||
Frequency = Device->Frequency;
|
||||
|
||||
|
||||
+2
-2
@@ -621,7 +621,7 @@ static ALCenum alsa_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
@@ -986,7 +986,7 @@ static ALCenum alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName)
|
||||
}
|
||||
}
|
||||
|
||||
pDevice->szDeviceName = strdup(deviceName);
|
||||
pDevice->DeviceName = strdup(deviceName);
|
||||
|
||||
pDevice->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
@@ -181,7 +181,7 @@ static ALCenum ca_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ static ALCenum DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = pData;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
@@ -824,7 +824,7 @@ static ALCenum DSoundOpenCapture(ALCdevice *device, const ALCchar *deviceName)
|
||||
pData->dwBufferBytes = DSCBDescription.dwBufferBytes;
|
||||
SetDefaultWFXChannelOrder(device);
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = pData;
|
||||
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
static ALCenum loopback_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
{
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -622,7 +622,7 @@ static DWORD CALLBACK MMDevApiMsgProc(void *ptr)
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
data->client = ptr;
|
||||
device->szDeviceName = get_device_name(data->mmdev);
|
||||
device->DeviceName = get_device_name(data->mmdev);
|
||||
}
|
||||
|
||||
if(FAILED(hr))
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ static ALCenum null_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
|
||||
data = (null_data*)calloc(1, sizeof(*data));
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ static ALCenum opensl_open_playback(ALCdevice *Device, const ALCchar *deviceName
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
Device->szDeviceName = strdup(deviceName);
|
||||
Device->DeviceName = strdup(deviceName);
|
||||
Device->ExtraData = data;
|
||||
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ static ALCenum oss_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
@@ -431,7 +431,7 @@ static ALCenum oss_open_capture(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ retry_open:
|
||||
}
|
||||
|
||||
device->ExtraData = data;
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
|
||||
goto error;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
@@ -525,8 +525,8 @@ static void sink_name_callback(pa_context *context, const pa_sink_info *info, in
|
||||
return;
|
||||
}
|
||||
|
||||
free(device->szDeviceName);
|
||||
device->szDeviceName = strdup(info->description);
|
||||
free(device->DeviceName);
|
||||
device->DeviceName = strdup(info->description);
|
||||
}
|
||||
|
||||
static void source_name_callback(pa_context *context, const pa_source_info *info, int eol, void *pdata)
|
||||
@@ -541,8 +541,8 @@ static void source_name_callback(pa_context *context, const pa_source_info *info
|
||||
return;
|
||||
}
|
||||
|
||||
free(device->szDeviceName);
|
||||
device->szDeviceName = strdup(info->description);
|
||||
free(device->DeviceName);
|
||||
device->DeviceName = strdup(info->description);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ static ALCenum sndio_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
@@ -113,7 +113,7 @@ static ALCenum solaris_open_playback(ALCdevice *device, const ALCchar *deviceNam
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ static ALCenum wave_open_playback(ALCdevice *device, const ALCchar *deviceName)
|
||||
return ALC_INVALID_VALUE;
|
||||
}
|
||||
|
||||
device->szDeviceName = strdup(deviceName);
|
||||
device->DeviceName = strdup(deviceName);
|
||||
device->ExtraData = data;
|
||||
return ALC_NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ retry_open:
|
||||
goto failure;
|
||||
}
|
||||
|
||||
pDevice->szDeviceName = strdup(PlaybackDeviceList[lDeviceID]);
|
||||
pDevice->DeviceName = strdup(PlaybackDeviceList[lDeviceID]);
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
failure:
|
||||
@@ -615,7 +615,7 @@ static ALCenum WinMMOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName)
|
||||
if (pData->hWaveThread == NULL)
|
||||
goto failure;
|
||||
|
||||
pDevice->szDeviceName = strdup(CaptureDeviceList[lDeviceID]);
|
||||
pDevice->DeviceName = strdup(CaptureDeviceList[lDeviceID]);
|
||||
return ALC_NO_ERROR;
|
||||
|
||||
failure:
|
||||
|
||||
@@ -539,7 +539,7 @@ struct ALCdevice_struct
|
||||
enum DevFmtChannels FmtChans;
|
||||
enum DevFmtType FmtType;
|
||||
|
||||
ALCchar *szDeviceName;
|
||||
ALCchar *DeviceName;
|
||||
|
||||
volatile ALCenum LastError;
|
||||
|
||||
@@ -631,7 +631,7 @@ struct ALCcontext_struct
|
||||
{
|
||||
volatile RefCount ref;
|
||||
|
||||
ALlistener Listener;
|
||||
ALlistener Listener;
|
||||
|
||||
UIntMap SourceMap;
|
||||
UIntMap EffectSlotMap;
|
||||
@@ -645,7 +645,7 @@ struct ALCcontext_struct
|
||||
|
||||
volatile ALfloat DopplerFactor;
|
||||
volatile ALfloat DopplerVelocity;
|
||||
volatile ALfloat flSpeedOfSound;
|
||||
volatile ALfloat SpeedOfSound;
|
||||
volatile ALenum DeferUpdates;
|
||||
|
||||
struct ALsource **ActiveSources;
|
||||
|
||||
+7
-7
@@ -135,7 +135,7 @@ AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum pname)
|
||||
break;
|
||||
|
||||
case AL_SPEED_OF_SOUND:
|
||||
if(Context->flSpeedOfSound != 0.0f)
|
||||
if(Context->SpeedOfSound != 0.0f)
|
||||
value = AL_TRUE;
|
||||
break;
|
||||
|
||||
@@ -176,7 +176,7 @@ AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname)
|
||||
break;
|
||||
|
||||
case AL_SPEED_OF_SOUND:
|
||||
value = (double)Context->flSpeedOfSound;
|
||||
value = (double)Context->SpeedOfSound;
|
||||
break;
|
||||
|
||||
case AL_DEFERRED_UPDATES_SOFT:
|
||||
@@ -216,7 +216,7 @@ AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
|
||||
break;
|
||||
|
||||
case AL_SPEED_OF_SOUND:
|
||||
value = Context->flSpeedOfSound;
|
||||
value = Context->SpeedOfSound;
|
||||
break;
|
||||
|
||||
case AL_DEFERRED_UPDATES_SOFT:
|
||||
@@ -256,7 +256,7 @@ AL_API ALint AL_APIENTRY alGetInteger(ALenum pname)
|
||||
break;
|
||||
|
||||
case AL_SPEED_OF_SOUND:
|
||||
value = (ALint)Context->flSpeedOfSound;
|
||||
value = (ALint)Context->SpeedOfSound;
|
||||
break;
|
||||
|
||||
case AL_DEFERRED_UPDATES_SOFT:
|
||||
@@ -526,16 +526,16 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
|
||||
ALCcontext_DecRef(Context);
|
||||
}
|
||||
|
||||
AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat flSpeedOfSound)
|
||||
AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat value)
|
||||
{
|
||||
ALCcontext *Context;
|
||||
|
||||
Context = GetContextRef();
|
||||
if(!Context) return;
|
||||
|
||||
if(flSpeedOfSound > 0.0f && isfinite(flSpeedOfSound))
|
||||
if(value > 0.0f && isfinite(value))
|
||||
{
|
||||
Context->flSpeedOfSound = flSpeedOfSound;
|
||||
Context->SpeedOfSound = value;
|
||||
Context->UpdateSources = AL_TRUE;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user