aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c28
-rw-r--r--Alc/mixer.c2
-rw-r--r--Alc/panning.c20
-rw-r--r--OpenAL32/Include/alMain.h6
4 files changed, 27 insertions, 29 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 7e88590c..0e064898 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1231,32 +1231,32 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
switch(device->FmtType)
{
case DevFmtByte:
- Write_ALbyte(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALbyte);
+ Write_ALbyte(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALbyte);
break;
case DevFmtUByte:
- Write_ALubyte(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALubyte);
+ Write_ALubyte(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALubyte);
break;
case DevFmtShort:
- Write_ALshort(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALshort);
+ Write_ALshort(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALshort);
break;
case DevFmtUShort:
- Write_ALushort(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALushort);
+ Write_ALushort(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALushort);
break;
case DevFmtInt:
- Write_ALint(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALint);
+ Write_ALint(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALint);
break;
case DevFmtUInt:
- Write_ALuint(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALuint);
+ Write_ALuint(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALuint);
break;
case DevFmtFloat:
- Write_ALfloat(device->DryBuffer, buffer, SamplesToDo, device->NumSpeakers);
- buffer = (char*)buffer + SamplesToDo*device->NumSpeakers*sizeof(ALfloat);
+ Write_ALfloat(device->DryBuffer, buffer, SamplesToDo, device->NumChannels);
+ buffer = (char*)buffer + SamplesToDo*device->NumChannels*sizeof(ALfloat);
break;
}
}
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 82165c02..5927bb7b 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -432,7 +432,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
parms->Filters[chan].ActiveType
);
if(!voice->IsHrtf)
- Mix(samples, Device->NumSpeakers, parms->OutBuffer, parms->Mix.Gains[chan],
+ Mix(samples, Device->NumChannels, parms->OutBuffer, parms->Mix.Gains[chan],
parms->Counter, OutPos, DstBufferSize);
else
HrtfMix(parms->OutBuffer, samples, parms->Counter, voice->Offset,
diff --git a/Alc/panning.c b/Alc/panning.c
index 99739d58..21bb7d8e 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -70,10 +70,10 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl
for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
gains[i] = 0.0f;
- for(i = 0;i < device->NumSpeakers;i++)
+ for(i = 0;i < device->NumChannels;i++)
{
for(j = 0;j < MAX_AMBI_COEFFS;j++)
- gains[i] += device->Speaker[i].HOACoeff[j]*coeffs[j];
+ gains[i] += device->Channel[i].HOACoeff[j]*coeffs[j];
gains[i] = maxf(gains[i], 0.0f) * ingain;
}
}
@@ -84,8 +84,8 @@ void ComputeAmbientGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[
for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
gains[i] = 0.0f;
- for(i = 0;i < device->NumSpeakers;i++)
- gains[i] = device->Speaker[i].HOACoeff[0] * ingain;
+ for(i = 0;i < device->NumChannels;i++)
+ gains[i] = device->Channel[i].HOACoeff[0] * ingain;
}
void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS])
@@ -94,10 +94,10 @@ void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat
for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
gains[i] = 0.0f;
- for(i = 0;i < device->NumSpeakers;i++)
+ for(i = 0;i < device->NumChannels;i++)
{
for(j = 0;j < 4;j++)
- gains[i] += device->Speaker[i].FOACoeff[j] * mtx[j];
+ gains[i] += device->Channel[i].FOACoeff[j] * mtx[j];
gains[i] *= ingain;
}
}
@@ -156,8 +156,8 @@ ALvoid aluInitPanning(ALCdevice *device)
size_t count = 0;
ALuint i, j;
- memset(device->Speaker, 0, sizeof(device->Speaker));
- device->NumSpeakers = 0;
+ memset(device->Channel, 0, sizeof(device->Channel));
+ device->NumChannels = 0;
switch(device->FmtChans)
{
@@ -202,12 +202,12 @@ ALvoid aluInitPanning(ALCdevice *device)
{
if(device->ChannelName[i] == chanmap[j].ChanName)
{
- device->Speaker[i] = chanmap[j].Config;
+ device->Channel[i] = chanmap[j].Config;
break;
}
}
if(j == count)
ERR("Failed to match channel %u (label %d) in config\n", i, device->ChannelName[i]);
}
- device->NumSpeakers = i;
+ device->NumChannels = i;
}
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index e18a238b..a592ef52 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -658,10 +658,8 @@ struct ALCdevice_struct
ALuint Flags;
enum Channel ChannelName[MAX_OUTPUT_CHANNELS];
-
- /* This only counts positional speakers, i.e. not including LFE. */
- ChannelConfig Speaker[MAX_OUTPUT_CHANNELS];
- ALuint NumSpeakers;
+ ChannelConfig Channel[MAX_OUTPUT_CHANNELS];
+ ALuint NumChannels;
ALuint64 ClockBase;
ALuint SamplesDone;