aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-02-12 19:50:49 -0800
committerChris Robinson <[email protected]>2008-02-12 19:50:49 -0800
commitb0720333cc4b879751b34701910077d6d0627190 (patch)
tree4b9cc381af2193520445b030bdcd49b76c2cdded /Alc/oss.c
parentc3446a10fafcfb8f49f20dcee1561e8fa750dd00 (diff)
UpdateSize is not used for capture devices
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index 477a354f..91b7a517 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -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->UpdateSize * device->FrameSize / periods);
+ log2FragmentSize = log2i(SampleSize * device->FrameSize / periods);
/* according to the OSS spec, 16 bytes are the minimum */
if (log2FragmentSize < 4)
@@ -368,9 +368,7 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName,
return ALC_FALSE;
}
- device->UpdateSize = info.fragsize / device->FrameSize;
-
- data->data_size = device->UpdateSize * device->FrameSize * info.fragments;
+ data->data_size = SampleSize * device->FrameSize * info.fragments;
data->mix_data = calloc(1, data->data_size);
device->ExtraData = data;