mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Fix build of the test_0.
This commit is contained in:
+13
-12
@@ -10,6 +10,7 @@
|
|||||||
#include "../extras/stb_vorbis.c"
|
#include "../extras/stb_vorbis.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MAL_NO_SDL
|
||||||
#define MINI_AL_IMPLEMENTATION
|
#define MINI_AL_IMPLEMENTATION
|
||||||
#include "../mini_al.h"
|
#include "../mini_al.h"
|
||||||
|
|
||||||
@@ -1494,7 +1495,7 @@ int do_channel_routing_tests()
|
|||||||
expectedWeight = 1;
|
expectedWeight = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
||||||
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
@@ -1603,7 +1604,7 @@ int do_channel_routing_tests()
|
|||||||
expectedWeight = 1;
|
expectedWeight = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
||||||
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
@@ -1710,7 +1711,7 @@ int do_channel_routing_tests()
|
|||||||
expectedWeight = 1;
|
expectedWeight = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
||||||
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
@@ -1762,7 +1763,7 @@ int do_channel_routing_tests()
|
|||||||
expectedWeight = 1;
|
expectedWeight = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeight) {
|
||||||
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
printf("Failed. Channel weight incorrect: %f\n", expectedWeight);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
@@ -1838,8 +1839,8 @@ int do_channel_routing_tests()
|
|||||||
|
|
||||||
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
||||||
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
||||||
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.weights[iChannelIn][iChannelOut]);
|
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.config.weights[iChannelIn][iChannelOut]);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1960,8 +1961,8 @@ int do_channel_routing_tests()
|
|||||||
|
|
||||||
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
||||||
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
||||||
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.weights[iChannelIn][iChannelOut]);
|
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.config.weights[iChannelIn][iChannelOut]);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2019,8 +2020,8 @@ int do_channel_routing_tests()
|
|||||||
|
|
||||||
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
||||||
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
||||||
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.weights[iChannelIn][iChannelOut]);
|
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.config.weights[iChannelIn][iChannelOut]);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2078,8 +2079,8 @@ int do_channel_routing_tests()
|
|||||||
|
|
||||||
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
for (mal_uint32 iChannelIn = 0; iChannelIn < routerConfig.channelsIn; ++iChannelIn) {
|
||||||
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
for (mal_uint32 iChannelOut = 0; iChannelOut < routerConfig.channelsOut; ++iChannelOut) {
|
||||||
if (router.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
if (router.config.weights[iChannelIn][iChannelOut] != expectedWeights[iChannelIn][iChannelOut]) {
|
||||||
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.weights[iChannelIn][iChannelOut]);
|
printf("Failed. Channel weight incorrect for [%d][%d]. Expected %f, got %f\n", iChannelIn, iChannelOut, expectedWeights[iChannelIn][iChannelOut], router.config.weights[iChannelIn][iChannelOut]);
|
||||||
hasError = MAL_TRUE;
|
hasError = MAL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user