Remove left-over backend-specific period options

This commit is contained in:
Chris Robinson
2009-09-16 23:29:32 -07:00
parent cbcaa54173
commit fb97ca6022
4 changed files with 5 additions and 13 deletions
+2 -2
View File
@@ -441,7 +441,7 @@ static ALCboolean alsa_reset_playback(ALCdevice *device)
}
allowmmap = GetConfigValueBool("alsa", "mmap", 1);
periods = GetConfigValueInt("alsa", "periods", device->NumUpdates);
periods = device->NumUpdates;
periodSizeInFrames = device->UpdateSize;
rate = device->Frequency;
@@ -464,7 +464,7 @@ static ALCboolean alsa_reset_playback(ALCdevice *device)
if(err == NULL && (i=psnd_pcm_hw_params_set_channels(data->pcmHandle, p, aluChannelsFromFormat(device->Format))) < 0)
err = "set channels";
/* set periods (implicitly constrains period/buffer parameters) */
if(err == NULL && periods && (i=psnd_pcm_hw_params_set_periods_near(data->pcmHandle, p, &periods, NULL)) < 0)
if(err == NULL && (i=psnd_pcm_hw_params_set_periods_near(data->pcmHandle, p, &periods, NULL)) < 0)
err = "set periods near";
/* set rate (implicitly constrains period/buffer parameters) */
if(err == NULL && (i=psnd_pcm_hw_params_set_rate_near(data->pcmHandle, p, &rate, NULL)) < 0)
-3
View File
@@ -342,9 +342,6 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device)
if(SUCCEEDED(hr))
{
DWORD num_frags = GetConfigValueInt("dsound", "periods", device->NumUpdates);
if(num_frags < 2) num_frags = 2;
memset(&DSBDescription,0,sizeof(DSBUFFERDESC));
DSBDescription.dwSize=sizeof(DSBUFFERDESC);
DSBDescription.dwFlags=DSBCAPS_GLOBALFOCUS|DSBCAPS_GETCURRENTPOSITION2;
+3 -3
View File
@@ -221,9 +221,7 @@ static ALCboolean oss_reset_playback(ALCdevice *device)
AL_PRINT("Unknown format?! %x\n", device->Format);
}
periods = GetConfigValueInt("oss", "periods", device->NumUpdates);
if((int)periods < 2)
periods = 4;
periods = device->NumUpdates;
numChannels = aluChannelsFromFormat(device->Format);
frameSize = numChannels * aluBytesFromFormat(device->Format);
@@ -233,6 +231,8 @@ static ALCboolean oss_reset_playback(ALCdevice *device)
/* according to the OSS spec, 16 bytes are the minimum */
if (log2FragmentSize < 4)
log2FragmentSize = 4;
/* Subtract one period since the temp mixing buffer counts as one. Still
* need at least two on the card, though. */
if(periods > 2) periods--;
numFragmentsLogSize = (periods << 16) | log2FragmentSize;
-5
View File
@@ -73,7 +73,6 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
const PaStreamInfo *streamInfo;
PaStreamParameters outParams;
pa_data *data;
int periods;
PaError err;
if(pa_handle == NULL)
@@ -109,10 +108,6 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
outParams.sampleFormat = -1;
AL_PRINT("Unknown format?! %x\n", device->Format);
}
periods = GetConfigValueInt("port", "periods", 4);
if((int)periods <= 0)
periods = 4;
outParams.channelCount = aluChannelsFromFormat(device->Format);
err = pPa_OpenStream(&data->stream, NULL, &outParams, device->Frequency,