diff options
author | Chris Robinson <[email protected]> | 2009-03-13 22:16:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-03-13 22:16:01 -0700 |
commit | 89ddd7d8e5a3338467c72dce291d8b5531aa6ae2 (patch) | |
tree | 99a3bfc75abdef418b218f10177026c7ebf0566c /Alc/oss.c | |
parent | 8d0c4ccb3b128348446f67b2e2895e51230d27b5 (diff) |
Don't modify the device struct until playback succesfully starts
Diffstat (limited to 'Alc/oss.c')
-rw-r--r-- | Alc/oss.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; } |