aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-19 19:28:34 -0800
committerChris Robinson <[email protected]>2008-01-19 19:28:34 -0800
commit86b7b3d54b7b753148612919a17610058841ed64 (patch)
tree2582c9d49435982cdb002c4ca3949537ddeb5270
parent799ba1f9541c1310186805bd3e276eb9fc708ca2 (diff)
Remove duplication of setting the max source count
-rw-r--r--Alc/ALc.c2
-rw-r--r--Alc/alsa.c1
-rw-r--r--Alc/dsound.c2
-rw-r--r--Alc/oss.c2
-rw-r--r--Alc/wave.c1
5 files changed, 2 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 08944700..0d6af1dc 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1156,6 +1156,8 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName)
if((ALint)device->UpdateFreq <= 0)
device->UpdateFreq = 8192;
+ device->MaxNoOfSources = 256;
+
// Find a playback device to open
for(i = 0;BackendList[i].Init;i++)
{
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 9484cf2c..d00902c4 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -413,7 +413,6 @@ open_alsa:
psnd_pcm_hw_params_free(p);
- device->MaxNoOfSources = 256;
device->UpdateFreq = bufferSizeInFrames;
data->size = psnd_pcm_frames_to_bytes(data->pcmHandle, device->UpdateFreq);
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 60977df7..d513fb73 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -182,9 +182,7 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
if(SUCCEEDED(hr))
hr = IDirectSoundBuffer_Play(pData->DSsbuffer, 0, 0, DSBPLAY_LOOPING);
- device->MaxNoOfSources = 256;
device->ExtraData = pData;
-
pData->thread = StartThread(DSoundProc, device);
if(!pData->thread)
hr = E_FAIL;
diff --git a/Alc/oss.c b/Alc/oss.c
index 2fc7c36d..f538d4b6 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -242,8 +242,6 @@ static ALCboolean oss_open_playback(ALCdevice *device, const ALCchar *deviceName
data->data_size = device->UpdateFreq * device->FrameSize;
data->mix_data = calloc(1, data->data_size);
- device->MaxNoOfSources = 256;
-
device->ExtraData = data;
data->thread = StartThread(OSSProc, device);
if(data->thread == NULL)
diff --git a/Alc/wave.c b/Alc/wave.c
index de4c87db..bed94714 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -212,7 +212,6 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam
data->DataStart = ftell(data->f);
- device->MaxNoOfSources = 256;
device->UpdateFreq = max(device->UpdateFreq, 2048);
data->size = device->UpdateFreq;