aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c2
-rw-r--r--Alc/alsa.c2
-rw-r--r--Alc/dsound.c4
-rw-r--r--Alc/oss.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 1a66dc2a..ab05d7b3 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -707,7 +707,7 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize
data[i++] = device->Frequency;
data[i++] = ALC_REFRESH;
- data[i++] = device->UpdateFreq;
+ data[i++] = device->Frequency / device->UpdateFreq;
data[i++] = ALC_SYNC;
data[i++] = ALC_FALSE;
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 7b8d4dfa..ea6ab2ea 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -438,7 +438,7 @@ open_alsa:
psnd_pcm_hw_params_free(p);
device->MaxNoOfSources = 256;
- device->UpdateFreq = bufferSizeInFrames * periods;
+ device->UpdateFreq = bufferSizeInFrames;
data->size = psnd_pcm_frames_to_bytes(data->pcmHandle, device->UpdateFreq);
if(access == SND_PCM_ACCESS_RW_INTERLEAVED)
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 90a422a2..ddedaf21 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -60,7 +60,7 @@ static void CALLBACK DirectSoundProc(UINT uID,UINT uReserved,DWORD_PTR dwUser,DW
(void)dwReserved1;
(void)dwReserved2;
- BufSize = pDevice->UpdateFreq * pDevice->FrameSize;
+ BufSize = pDevice->UpdateFreq * 2 * pDevice->FrameSize;
// Get current play and write cursors
IDirectSoundBuffer_GetCurrentPosition(pData->DSsbuffer,&PlayCursor,&WriteCursor);
@@ -169,7 +169,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 * device->FrameSize;
+ DSBDescription.dwBufferBytes=device->UpdateFreq * 2 * device->FrameSize;
DSBDescription.lpwfxFormat=&OutputType;
hr = IDirectSound_CreateSoundBuffer(pData->lpDS, &DSBDescription, &pData->DSsbuffer, NULL);
}
diff --git a/Alc/oss.c b/Alc/oss.c
index 6229fc09..483f2247 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -406,7 +406,7 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName,
device->UpdateFreq = info.fragsize / device->FrameSize;
- data->data_size = device->UpdateFreq * device->FrameSize;
+ data->data_size = device->UpdateFreq * device->FrameSize * info.fragments;
data->mix_data = calloc(1, data->data_size);
device->ExtraData = data;