From c3446a10fafcfb8f49f20dcee1561e8fa750dd00 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 12 Feb 2008 19:38:27 -0800 Subject: [PATCH] Rename UpdateFreq device field to UpdateSize --- Alc/ALc.c | 10 +++++----- Alc/alsa.c | 6 +++--- Alc/dsound.c | 6 +++--- Alc/oss.c | 12 ++++++------ Alc/wave.c | 6 +++--- OpenAL32/Include/alMain.h | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Alc/ALc.c b/Alc/ALc.c index 3b1d35e1..7ce5c85b 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -753,7 +753,7 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize data[i++] = device->Frequency; data[i++] = ALC_REFRESH; - data[i++] = device->Frequency / device->UpdateFreq; + data[i++] = device->Frequency / device->UpdateSize; data[i++] = ALC_SYNC; data[i++] = ALC_FALSE; @@ -791,7 +791,7 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize else if(!size) SetALCError(ALC_INVALID_VALUE); else - *data = device->Frequency / device->UpdateFreq; + *data = device->Frequency / device->UpdateSize; break; case ALC_SYNC: @@ -1177,9 +1177,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName) device->FrameSize = aluBytesFromFormat(device->Format) * aluChannelsFromFormat(device->Format); - device->UpdateFreq = GetConfigValueInt(NULL, "refresh", 8192); - if((ALint)device->UpdateFreq <= 0) - device->UpdateFreq = 8192; + device->UpdateSize = GetConfigValueInt(NULL, "refresh", 8192); + if((ALint)device->UpdateSize <= 0) + device->UpdateSize = 8192; device->MaxNoOfSources = GetConfigValueInt(NULL, "sources", 256); if((ALint)device->MaxNoOfSources <= 0) diff --git a/Alc/alsa.c b/Alc/alsa.c index aa0b56bc..67945ae8 100644 --- a/Alc/alsa.c +++ b/Alc/alsa.c @@ -357,7 +357,7 @@ open_alsa: } periods = GetConfigValueInt("alsa", "periods", 0); - bufferSizeInFrames = device->UpdateFreq; + bufferSizeInFrames = device->UpdateSize; str = GetConfigValue("alsa", "mmap", "true"); allowmmap = (strcasecmp(str, "true") == 0 || @@ -413,9 +413,9 @@ open_alsa: psnd_pcm_hw_params_free(p); - device->UpdateFreq = bufferSizeInFrames; + device->UpdateSize = bufferSizeInFrames; - data->size = psnd_pcm_frames_to_bytes(data->pcmHandle, device->UpdateFreq); + data->size = psnd_pcm_frames_to_bytes(data->pcmHandle, device->UpdateSize); if(access == SND_PCM_ACCESS_RW_INTERLEAVED) { data->buffer = malloc(data->size); diff --git a/Alc/dsound.c b/Alc/dsound.c index 98c50e83..22c6f827 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -73,7 +73,7 @@ static ALuint DSoundProc(ALvoid *ptr) DWORD avail; HRESULT err; - BufferSize = pDevice->UpdateFreq*DS_FRAGS*pDevice->FrameSize; + BufferSize = pDevice->UpdateSize*DS_FRAGS*pDevice->FrameSize; while(!pData->killNow) { @@ -238,7 +238,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam OutputType.Format.nAvgBytesPerSec = OutputType.Format.nSamplesPerSec*OutputType.Format.nBlockAlign; OutputType.Format.cbSize = 0; - device->UpdateFreq /= DS_FRAGS; + device->UpdateSize /= DS_FRAGS; } if(OutputType.Format.nChannels > 2) @@ -266,7 +266,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam memset(&DSBDescription,0,sizeof(DSBUFFERDESC)); DSBDescription.dwSize=sizeof(DSBUFFERDESC); DSBDescription.dwFlags=DSBCAPS_GLOBALFOCUS|DSBCAPS_GETCURRENTPOSITION2; - DSBDescription.dwBufferBytes=device->UpdateFreq * DS_FRAGS * device->FrameSize; + DSBDescription.dwBufferBytes=device->UpdateSize * DS_FRAGS * device->FrameSize; DSBDescription.lpwfxFormat=&OutputType.Format; hr = IDirectSound_CreateSoundBuffer(pData->lpDS, &DSBDescription, &pData->DSsbuffer, NULL); } diff --git a/Alc/oss.c b/Alc/oss.c index 10591b79..477a354f 100644 --- a/Alc/oss.c +++ b/Alc/oss.c @@ -197,7 +197,7 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName periods = 4; numChannels = aluChannelsFromFormat(device->Format); ossSpeed = device->Frequency; - log2FragmentSize = log2i(device->UpdateFreq * device->FrameSize / periods); + log2FragmentSize = log2i(device->UpdateSize * device->FrameSize / periods); /* according to the OSS spec, 16 bytes are the minimum */ if (log2FragmentSize < 4) @@ -237,9 +237,9 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName return ALC_FALSE; } - device->UpdateFreq = info.fragsize / device->FrameSize; + device->UpdateSize = info.fragsize / device->FrameSize; - data->data_size = device->UpdateFreq * device->FrameSize; + data->data_size = device->UpdateSize * device->FrameSize; data->mix_data = calloc(1, data->data_size); device->ExtraData = data; @@ -321,7 +321,7 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName, periods = 4; numChannels = aluChannelsFromFormat(device->Format); ossSpeed = frequency; - log2FragmentSize = log2i(device->UpdateFreq * device->FrameSize / periods); + log2FragmentSize = log2i(device->UpdateSize * device->FrameSize / periods); /* according to the OSS spec, 16 bytes are the minimum */ if (log2FragmentSize < 4) @@ -368,9 +368,9 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName, return ALC_FALSE; } - device->UpdateFreq = info.fragsize / device->FrameSize; + device->UpdateSize = info.fragsize / device->FrameSize; - data->data_size = device->UpdateFreq * device->FrameSize * info.fragments; + data->data_size = device->UpdateSize * device->FrameSize * info.fragments; data->mix_data = calloc(1, data->data_size); device->ExtraData = data; diff --git a/Alc/wave.c b/Alc/wave.c index bed94714..19f2d9e1 100644 --- a/Alc/wave.c +++ b/Alc/wave.c @@ -66,7 +66,7 @@ static ALuint WaveProc(ALvoid *ptr) now = timeGetTime(); avail = (now-last) * pDevice->Frequency / 1000; - if(avail < pDevice->UpdateFreq/4) + if(avail < pDevice->UpdateSize/4) { Sleep(1); continue; @@ -212,9 +212,9 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam data->DataStart = ftell(data->f); - device->UpdateFreq = max(device->UpdateFreq, 2048); + device->UpdateSize = max(device->UpdateSize, 2048); - data->size = device->UpdateFreq; + data->size = device->UpdateSize; data->buffer = malloc(data->size * channels * bits / 8); if(!data->buffer) { diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 74ef39eb..a833be5e 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -139,7 +139,7 @@ struct ALCdevice_struct ALboolean IsCaptureDevice; ALuint Frequency; - ALuint UpdateFreq; + ALuint UpdateSize; ALuint FrameSize; ALenum Format; -- 2.11.4.GIT