aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index 8f2e6adc..c7f5421e 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -79,15 +79,19 @@ static ALuint OSSProc(ALvoid *ptr)
{
ALCdevice *pDevice = (ALCdevice*)ptr;
oss_data *data = (oss_data*)pDevice->ExtraData;
+ ALint frameSize;
int wrote;
+ frameSize = aluChannelsFromFormat(pDevice->Format) *
+ aluBytesFromFormat(pDevice->Format);
+
while(!data->killNow && !pDevice->Connected)
{
ALint len = data->data_size;
ALubyte *WritePtr = data->mix_data;
SuspendContext(NULL);
- aluMixData(pDevice->Context, WritePtr, len, pDevice->Format);
+ aluMixData(pDevice->Context, WritePtr, len/frameSize, pDevice->Format);
ProcessContext(NULL);
while(len > 0 && !data->killNow)