aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-03-13 22:16:01 -0700
committerChris Robinson <[email protected]>2009-03-13 22:16:01 -0700
commit89ddd7d8e5a3338467c72dce291d8b5531aa6ae2 (patch)
tree99a3bfc75abdef418b218f10177026c7ebf0566c /Alc/oss.c
parent8d0c4ccb3b128348446f67b2e2895e51230d27b5 (diff)
Don't modify the device struct until playback succesfully starts
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index 399d64bd..b1ec7887 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -221,8 +221,6 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName
}
#undef ok
- device->Frequency = ossSpeed;
-
if((int)aluChannelsFromFormat(device->Format) != numChannels)
{
AL_PRINT("Could not set %d channels, got %d instead\n", aluChannelsFromFormat(device->Format), numChannels);
@@ -240,8 +238,6 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName
return ALC_FALSE;
}
- device->UpdateSize = info.fragsize / frameSize;
-
data->data_size = device->UpdateSize * frameSize;
data->mix_data = calloc(1, data->data_size);
@@ -255,6 +251,9 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName
return ALC_FALSE;
}
+ device->Frequency = ossSpeed;
+ device->UpdateSize = info.fragsize / frameSize;
+
return ALC_TRUE;
}