aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-04-22 02:38:09 -0700
committerChris Robinson <[email protected]>2018-04-22 02:38:09 -0700
commitb51d30f84db4d09574d61081b56af85e2836d0fc (patch)
tree16222d924bc936c7db7c9c1a7e8cde1e458ab271 /Alc/ALu.c
parentea8b52ee2cd3d5aebbb60c8ae9ab4ae13aadf24d (diff)
Change some if checks to asserts since they must be true
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d8301f2b..d6b15183 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -305,26 +305,24 @@ static void ProcessUhj(ALCdevice *device, ALsizei SamplesToDo)
{
int lidx = GetChannelIdxByName(&device->RealOut, FrontLeft);
int ridx = GetChannelIdxByName(&device->RealOut, FrontRight);
- if(LIKELY(lidx != -1 && ridx != -1))
- {
- /* Encode to stereo-compatible 2-channel UHJ output. */
- EncodeUhj2(device->Uhj_Encoder,
- device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
- device->Dry.Buffer, SamplesToDo
- );
- }
+ assert(lidx != -1 && ridx != -1);
+
+ /* Encode to stereo-compatible 2-channel UHJ output. */
+ EncodeUhj2(device->Uhj_Encoder,
+ device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
+ device->Dry.Buffer, SamplesToDo
+ );
}
static void ProcessBs2b(ALCdevice *device, ALsizei SamplesToDo)
{
int lidx = GetChannelIdxByName(&device->RealOut, FrontLeft);
int ridx = GetChannelIdxByName(&device->RealOut, FrontRight);
- if(LIKELY(lidx != -1 && ridx != -1))
- {
- /* Apply binaural/crossfeed filter */
- bs2b_cross_feed(device->Bs2b, device->RealOut.Buffer[lidx],
- device->RealOut.Buffer[ridx], SamplesToDo);
- }
+ assert(lidx != -1 && ridx != -1);
+
+ /* Apply binaural/crossfeed filter */
+ bs2b_cross_feed(device->Bs2b, device->RealOut.Buffer[lidx],
+ device->RealOut.Buffer[ridx], SamplesToDo);
}
void aluSelectPostProcess(ALCdevice *device)