Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
81ae390c
Commit
81ae390c
authored
Mar 31, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the term "deinterleaved" instead of "separated".
parent
7272a092
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
93 deletions
+93
-93
mini_al.h
mini_al.h
+28
-28
tests/mal_test_0.c
tests/mal_test_0.c
+65
-65
No files found.
mini_al.h
View file @
81ae390c
...
...
@@ -694,8 +694,8 @@ typedef struct
typedef
struct
mal_format_converter
mal_format_converter
;
typedef
mal_uint32
(
*
mal_format_converter_read_proc
)
(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
*
pFramesOut
,
void
*
pUserData
);
typedef
mal_uint32
(
*
mal_format_converter_read_
separat
ed_proc
)(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
);
typedef
mal_uint32
(
*
mal_format_converter_read_proc
)
(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
*
pFramesOut
,
void
*
pUserData
);
typedef
mal_uint32
(
*
mal_format_converter_read_
deinterleav
ed_proc
)(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
);
typedef
struct
{
...
...
@@ -711,7 +711,7 @@ struct mal_format_converter
{
mal_format_converter_config
config
;
mal_format_converter_read_proc
onRead
;
mal_format_converter_read_
separated_proc
onReadSeparat
ed
;
mal_format_converter_read_
deinterleaved_proc
onReadDeinterleav
ed
;
void
*
pUserData
;
void
(
*
onConvertPCM
)(
void
*
dst
,
const
void
*
src
,
mal_uint64
count
,
mal_dither_mode
ditherMode
);
void
(
*
onInterleavePCM
)(
void
*
dst
,
const
void
**
src
,
mal_uint64
frameCount
,
mal_uint32
channels
);
...
...
@@ -721,8 +721,8 @@ struct mal_format_converter
typedef
struct
mal_channel_router
mal_channel_router
;
//typedef mal_uint32 (* mal_channel_router_read_proc) (mal_channel_router* pRouter, mal_uint32 frameCount, void* pFramesOut, void* pUserData);
typedef
mal_uint32
(
*
mal_channel_router_read_
separat
ed_proc
)(
mal_channel_router
*
pRouter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
);
//typedef mal_uint32 (* mal_channel_router_read_proc)
(mal_channel_router* pRouter, mal_uint32 frameCount, void* pFramesOut, void* pUserData);
typedef
mal_uint32
(
*
mal_channel_router_read_
deinterleav
ed_proc
)(
mal_channel_router
*
pRouter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
);
typedef
struct
{
...
...
@@ -737,7 +737,7 @@ struct mal_channel_router
{
mal_channel_router_config
config
;
//mal_channel_router_read_proc onRead;
mal_channel_router_read_
separated_proc
onReadSeparat
ed
;
mal_channel_router_read_
deinterleaved_proc
onReadDeinterleav
ed
;
void
*
pUserData
;
mal_bool32
isPassthrough
:
1
;
mal_bool32
isSimpleShuffle
:
1
;
...
...
@@ -1835,13 +1835,13 @@ mal_bool32 mal_channel_map_contains_channel_position(mal_uint32 channels, const
mal_result
mal_format_converter_init
(
const
mal_format_converter_config
*
pConfig
,
mal_format_converter_read_proc
onRead
,
void
*
pUserData
,
mal_format_converter
*
pConverter
);
// Initializes a format converter when the input data is non-interleaved.
mal_result
mal_format_converter_init_
separated
(
const
mal_format_converter_config
*
pConfig
,
mal_format_converter_read_separat
ed_proc
onRead
,
void
*
pUserData
,
mal_format_converter
*
pConverter
);
mal_result
mal_format_converter_init_
deinterleaved
(
const
mal_format_converter_config
*
pConfig
,
mal_format_converter_read_deinterleav
ed_proc
onRead
,
void
*
pUserData
,
mal_format_converter
*
pConverter
);
// Reads data from the format converter as interleaved channels.
mal_uint64
mal_format_converter_read_frames
(
mal_format_converter
*
pConverter
,
mal_uint64
frameCount
,
void
*
pFramesOut
);
// Reads data from the format converter as
separat
ed channels.
mal_uint64
mal_format_converter_read_frames_
separat
ed
(
mal_format_converter
*
pConverter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
);
// Reads data from the format converter as
deinterleav
ed channels.
mal_uint64
mal_format_converter_read_frames_
deinterleav
ed
(
mal_format_converter
*
pConverter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
);
...
...
@@ -1855,10 +1855,10 @@ mal_uint64 mal_format_converter_read_frames_separated(mal_format_converter* pCon
///////////////////////////////////////////////////////////////////////////////
// Initializes a channel router where it is assumed that the input data is non-interleaved.
mal_result
mal_channel_router_init_
separated
(
const
mal_channel_router_config
*
pConfig
,
mal_channel_router_read_separat
ed_proc
onRead
,
void
*
pUserData
,
mal_channel_router
*
pRouter
);
mal_result
mal_channel_router_init_
deinterleaved
(
const
mal_channel_router_config
*
pConfig
,
mal_channel_router_read_deinterleav
ed_proc
onRead
,
void
*
pUserData
,
mal_channel_router
*
pRouter
);
// Reads data from the channel router as
separat
ed channels.
mal_uint64
mal_channel_router_read_frames_
separat
ed
(
mal_channel_router
*
pRouter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
);
// Reads data from the channel router as
deinterleav
ed channels.
mal_uint64
mal_channel_router_read_frames_
deinterleav
ed
(
mal_channel_router
*
pRouter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
);
...
...
@@ -10741,7 +10741,7 @@ int mal_device__jack_process_callback(mal_jack_nframes_t frameCount, void* pUser
if
(
pDevice
->
type
==
mal_device_type_playback
)
{
mal_device__read_frames_from_client
(
pDevice
,
frameCount
,
pDevice
->
jack
.
pIntermediaryBuffer
);
// Channels need to be
separat
ed.
// Channels need to be
deinterleav
ed.
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
pDevice
->
internalChannels
;
++
iChannel
)
{
float
*
pDst
=
(
float
*
)((
mal_jack_port_get_buffer_proc
)
pContext
->
jack
.
jack_port_get_buffer
)((
mal_jack_port_t
*
)
pDevice
->
jack
.
pPorts
[
iChannel
],
frameCount
);
if
(
pDst
!=
NULL
)
{
...
...
@@ -16861,14 +16861,14 @@ mal_result mal_format_converter_init(const mal_format_converter_config* pConfig,
return
MAL_SUCCESS
;
}
mal_result
mal_format_converter_init_
separated
(
const
mal_format_converter_config
*
pConfig
,
mal_format_converter_read_separat
ed_proc
onRead
,
void
*
pUserData
,
mal_format_converter
*
pConverter
)
mal_result
mal_format_converter_init_
deinterleaved
(
const
mal_format_converter_config
*
pConfig
,
mal_format_converter_read_deinterleav
ed_proc
onRead
,
void
*
pUserData
,
mal_format_converter
*
pConverter
)
{
mal_result
result
=
mal_format_converter_init__common
(
pConfig
,
pUserData
,
pConverter
);
if
(
result
!=
MAL_SUCCESS
)
{
return
result
;
}
pConverter
->
onRead
Separat
ed
=
onRead
;
pConverter
->
onRead
Deinterleav
ed
=
onRead
;
return
MAL_SUCCESS
;
}
...
...
@@ -16931,7 +16931,7 @@ mal_uint64 mal_format_converter_read_frames(mal_format_converter* pConverter, ma
}
}
}
else
{
// Input data is
separat
ed. If a conversion is required we need to do an intermediary step.
// Input data is
deinterleav
ed. If a conversion is required we need to do an intermediary step.
mal_uint8
tempSamplesOfOutFormat
[
MAL_MAX_CHANNELS
][
MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES
*
128
];
mal_assert
(
sizeof
(
tempSamplesOfOutFormat
[
0
])
<=
0xFFFFFFFFF
);
...
...
@@ -16953,7 +16953,7 @@ mal_uint64 mal_format_converter_read_frames(mal_format_converter* pConverter, ma
if
(
pConverter
->
config
.
formatIn
==
pConverter
->
config
.
formatOut
)
{
// Only interleaving.
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Separat
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTempSampleOfOutFormat
,
pConverter
->
pUserData
);
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Deinterleav
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTempSampleOfOutFormat
,
pConverter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
@@ -16967,7 +16967,7 @@ mal_uint64 mal_format_converter_read_frames(mal_format_converter* pConverter, ma
}
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Separat
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTempSampleOfInFormat
,
pConverter
->
pUserData
);
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Deinterleav
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTempSampleOfInFormat
,
pConverter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
@@ -16987,7 +16987,7 @@ mal_uint64 mal_format_converter_read_frames(mal_format_converter* pConverter, ma
return
totalFramesRead
;
}
mal_uint64
mal_format_converter_read_frames_
separat
ed
(
mal_format_converter
*
pConverter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
)
mal_uint64
mal_format_converter_read_frames_
deinterleav
ed
(
mal_format_converter
*
pConverter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
)
{
if
(
pConverter
==
NULL
||
ppSamplesOut
==
NULL
)
{
return
0
;
...
...
@@ -17042,7 +17042,7 @@ mal_uint64 mal_format_converter_read_frames_separated(mal_format_converter* pCon
}
}
}
else
{
// Input data is
separat
ed.
// Input data is
deinterleav
ed.
if
(
pConverter
->
config
.
formatIn
==
pConverter
->
config
.
formatOut
)
{
// Pass through.
while
(
totalFramesRead
<
frameCount
)
{
...
...
@@ -17052,7 +17052,7 @@ mal_uint64 mal_format_converter_read_frames_separated(mal_format_converter* pCon
framesToReadRightNow
=
0xFFFFFFFF
;
}
mal_uint32
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Separat
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppNextSamplesOut
,
pConverter
->
pUserData
);
mal_uint32
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Deinterleav
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppNextSamplesOut
,
pConverter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
@@ -17081,7 +17081,7 @@ mal_uint64 mal_format_converter_read_frames_separated(mal_format_converter* pCon
framesToReadRightNow
=
maxFramesToReadAtATime
;
}
mal_uint32
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Separat
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTemp
,
pConverter
->
pUserData
);
mal_uint32
framesJustRead
=
(
mal_uint32
)
pConverter
->
onRead
Deinterleav
ed
(
pConverter
,
(
mal_uint32
)
framesToReadRightNow
,
ppTemp
,
pConverter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
@@ -17654,7 +17654,7 @@ mal_result mal_channel_router_init__common(const mal_channel_router_config* pCon
return
MAL_SUCCESS
;
}
mal_result
mal_channel_router_init_
separated
(
const
mal_channel_router_config
*
pConfig
,
mal_channel_router_read_separat
ed_proc
onRead
,
void
*
pUserData
,
mal_channel_router
*
pRouter
)
mal_result
mal_channel_router_init_
deinterleaved
(
const
mal_channel_router_config
*
pConfig
,
mal_channel_router_read_deinterleav
ed_proc
onRead
,
void
*
pUserData
,
mal_channel_router
*
pRouter
)
{
mal_result
result
=
mal_channel_router_init__common
(
pConfig
,
pUserData
,
pRouter
);
if
(
result
!=
MAL_SUCCESS
)
{
...
...
@@ -17665,7 +17665,7 @@ mal_result mal_channel_router_init_separated(const mal_channel_router_config* pC
return
MAL_INVALID_ARGS
;
}
pRouter
->
onRead
Separat
ed
=
onRead
;
pRouter
->
onRead
Deinterleav
ed
=
onRead
;
return
MAL_SUCCESS
;
}
...
...
@@ -17701,7 +17701,7 @@ void mal_channel_router__do_routing(mal_channel_router* pRouter, mal_uint64 fram
}
}
mal_uint64
mal_channel_router_read_frames_
separat
ed
(
mal_channel_router
*
pRouter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
)
mal_uint64
mal_channel_router_read_frames_
deinterleav
ed
(
mal_channel_router
*
pRouter
,
mal_uint64
frameCount
,
void
**
ppSamplesOut
)
{
if
(
pRouter
==
NULL
||
ppSamplesOut
==
NULL
)
{
return
0
;
...
...
@@ -17710,7 +17710,7 @@ mal_uint64 mal_channel_router_read_frames_separated(mal_channel_router* pRouter,
// Fast path for a passthrough.
if
(
pRouter
->
isPassthrough
)
{
if
(
frameCount
<=
0xFFFFFFFF
)
{
return
(
mal_uint32
)
pRouter
->
onRead
Separat
ed
(
pRouter
,
(
mal_uint32
)
frameCount
,
ppSamplesOut
,
pRouter
->
pUserData
);
return
(
mal_uint32
)
pRouter
->
onRead
Deinterleav
ed
(
pRouter
,
(
mal_uint32
)
frameCount
,
ppSamplesOut
,
pRouter
->
pUserData
);
}
else
{
float
*
ppNextSamplesOut
[
MAL_MAX_CHANNELS
];
mal_copy_memory
(
ppNextSamplesOut
,
ppSamplesOut
,
sizeof
(
float
*
)
*
pRouter
->
config
.
channelsOut
);
...
...
@@ -17723,7 +17723,7 @@ mal_uint64 mal_channel_router_read_frames_separated(mal_channel_router* pRouter,
framesToReadRightNow
=
0xFFFFFFFF
;
}
mal_uint32
framesJustRead
=
(
mal_uint32
)
pRouter
->
onRead
Separat
ed
(
pRouter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppNextSamplesOut
,
pRouter
->
pUserData
);
mal_uint32
framesJustRead
=
(
mal_uint32
)
pRouter
->
onRead
Deinterleav
ed
(
pRouter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppNextSamplesOut
,
pRouter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
@@ -17758,7 +17758,7 @@ mal_uint64 mal_channel_router_read_frames_separated(mal_channel_router* pRouter,
framesToReadRightNow
=
maxFramesToReadEachIteration
;
}
mal_uint32
framesJustRead
=
pRouter
->
onRead
Separat
ed
(
pRouter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppTemp
,
pRouter
->
pUserData
);
mal_uint32
framesJustRead
=
pRouter
->
onRead
Deinterleav
ed
(
pRouter
,
(
mal_uint32
)
framesToReadRightNow
,
(
void
**
)
ppTemp
,
pRouter
->
pUserData
);
if
(
framesJustRead
==
0
)
{
break
;
}
...
...
tests/mal_test_0.c
View file @
81ae390c
...
...
@@ -657,20 +657,20 @@ int do_format_conversion_tests()
}
int
compare_interleaved_and_
separated_buffers
(
const
void
*
interleaved
,
const
void
**
separat
ed
,
mal_uint32
frameCount
,
mal_uint32
channels
,
mal_format
format
)
int
compare_interleaved_and_
deinterleaved_buffers
(
const
void
*
interleaved
,
const
void
**
deinterleav
ed
,
mal_uint32
frameCount
,
mal_uint32
channels
,
mal_format
format
)
{
mal_uint32
bytesPerSample
=
mal_get_bytes_per_sample
(
format
);
const
mal_uint8
*
interleaved8
=
(
const
mal_uint8
*
)
interleaved
;
const
mal_uint8
**
separated8
=
(
const
mal_uint8
**
)
separat
ed
;
const
mal_uint8
**
deinterleaved8
=
(
const
mal_uint8
**
)
deinterleav
ed
;
for
(
mal_uint32
iFrame
=
0
;
iFrame
<
frameCount
;
iFrame
+=
1
)
{
const
mal_uint8
*
interleavedFrame
=
interleaved8
+
iFrame
*
channels
*
bytesPerSample
;
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
channels
;
iChannel
+=
1
)
{
const
mal_uint8
*
separatedFrame
=
separat
ed8
[
iChannel
]
+
iFrame
*
bytesPerSample
;
const
mal_uint8
*
deinterleavedFrame
=
deinterleav
ed8
[
iChannel
]
+
iFrame
*
bytesPerSample
;
int
result
=
memcmp
(
interleavedFrame
+
iChannel
*
bytesPerSample
,
separat
edFrame
,
bytesPerSample
);
int
result
=
memcmp
(
interleavedFrame
+
iChannel
*
bytesPerSample
,
deinterleav
edFrame
,
bytesPerSample
);
if
(
result
!=
0
)
{
return
-
1
;
}
...
...
@@ -715,16 +715,16 @@ int do_interleaving_test(mal_format format)
// Interleave.
mal_pcm_interleave_u8__reference
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Separat
ed to Interleaved (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Deinterleav
ed to Interleaved (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
// Deinterleave.
mal_pcm_deinterleave_u8__reference
((
void
**
)
ppDst
,
dsti
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Separat
ed (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Deinterleav
ed (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
...
...
@@ -756,16 +756,16 @@ int do_interleaving_test(mal_format format)
// Interleave.
mal_pcm_interleave_s16__reference
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Separat
ed to Interleaved (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Deinterleav
ed to Interleaved (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
// Deinterleave.
mal_pcm_deinterleave_s16__reference
((
void
**
)
ppDst
,
dsti
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Separat
ed (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Deinterleav
ed (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
...
...
@@ -799,16 +799,16 @@ int do_interleaving_test(mal_format format)
// Interleave.
mal_pcm_interleave_s24__reference
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Separat
ed to Interleaved (Channels = %u)
\n
"
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Deinterleav
ed to Interleaved (Channels = %u)
\n
"
,
channelCountForThisIteration
);
result
=
-
1
;
break
;
}
// Deinterleave.
mal_pcm_deinterleave_s24__reference
((
void
**
)
ppDst
,
dsti
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Separat
ed (Channels = %u)
\n
"
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Deinterleav
ed (Channels = %u)
\n
"
,
channelCountForThisIteration
);
result
=
-
1
;
break
;
}
...
...
@@ -840,16 +840,16 @@ int do_interleaving_test(mal_format format)
// Interleave.
mal_pcm_interleave_s32__reference
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Separat
ed to Interleaved (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Deinterleav
ed to Interleaved (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
// Deinterleave.
mal_pcm_deinterleave_s32__reference
((
void
**
)
ppDst
,
dsti
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Separat
ed (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Deinterleav
ed (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
...
...
@@ -881,16 +881,16 @@ int do_interleaving_test(mal_format format)
// Interleave.
mal_pcm_interleave_f32__reference
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Separat
ed to Interleaved (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppSrc
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED.
Deinterleav
ed to Interleaved (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
// Deinterleave.
mal_pcm_deinterleave_f32__reference
((
void
**
)
ppDst
,
dsti
,
frameCount
,
channelCountForThisIteration
);
if
(
compare_interleaved_and_
separat
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Separat
ed (Channels = %u)
\n
"
,
i
);
if
(
compare_interleaved_and_
deinterleav
ed_buffers
(
dsti
,
(
const
void
**
)
ppDst
,
frameCount
,
channelCountForThisIteration
,
format
)
!=
0
)
{
printf
(
"FAILED. Interleaved to
Deinterleav
ed (Channels = %u)
\n
"
,
i
);
result
=
-
1
;
break
;
}
...
...
@@ -964,7 +964,7 @@ mal_uint32 converter_test_interleaved_callback(mal_format_converter* pConverter,
return
frameCount
;
}
mal_uint32
converter_test_
separat
ed_callback
(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
)
mal_uint32
converter_test_
deinterleav
ed_callback
(
mal_format_converter
*
pConverter
,
mal_uint32
frameCount
,
void
**
ppSamplesOut
,
void
*
pUserData
)
{
mal_sine_wave
*
pSineWave
=
(
mal_sine_wave
*
)
pUserData
;
mal_assert
(
pSineWave
!=
NULL
);
...
...
@@ -1034,13 +1034,13 @@ int do_format_converter_tests()
return
-
1
;
}
mal_int16
separat
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Separat
edFrames
[
MAL_MAX_CHANNELS
];
mal_int16
deinterleav
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Deinterleav
edFrames
[
MAL_MAX_CHANNELS
];
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
converter
.
config
.
channels
;
iChannel
+=
1
)
{
pp
SeparatedFrames
[
iChannel
]
=
&
separat
edFrames
[
iChannel
];
pp
DeinterleavedFrames
[
iChannel
]
=
&
deinterleav
edFrames
[
iChannel
];
}
mal_uint64
framesRead
=
mal_format_converter_read_frames_
separated
(
&
converter
,
1024
,
ppSeparat
edFrames
);
mal_uint64
framesRead
=
mal_format_converter_read_frames_
deinterleaved
(
&
converter
,
1024
,
ppDeinterleav
edFrames
);
if
(
framesRead
!=
1024
)
{
printf
(
"Failed to read interleaved data from converter.
\n
"
);
return
-
1
;
...
...
@@ -1057,7 +1057,7 @@ int do_format_converter_tests()
return
-
1
;
}
fwrite
(
pp
Separat
edFrames
[
iChannel
],
sizeof
(
mal_int16
),
framesRead
,
pFile
);
fwrite
(
pp
Deinterleav
edFrames
[
iChannel
],
sizeof
(
mal_int16
),
framesRead
,
pFile
);
fclose
(
pFile
);
}
}
...
...
@@ -1065,7 +1065,7 @@ int do_format_converter_tests()
// Deinterleaved/Interleaved f32 to s16.
{
mal_sine_wave_init
(
amplitude
,
periodsPerSecond
,
sampleRate
,
&
sineWave
);
result
=
mal_format_converter_init_
separated
(
&
config
,
converter_test_separat
ed_callback
,
&
sineWave
,
&
converter
);
result
=
mal_format_converter_init_
deinterleaved
(
&
config
,
converter_test_deinterleav
ed_callback
,
&
sineWave
,
&
converter
);
if
(
result
!=
MAL_SUCCESS
)
{
printf
(
"Failed to initialize converter.
\n
"
);
return
-
1
;
...
...
@@ -1091,19 +1091,19 @@ int do_format_converter_tests()
// Deinterleaved/Deinterleaved f32 to s16.
{
mal_sine_wave_init
(
amplitude
,
periodsPerSecond
,
sampleRate
,
&
sineWave
);
result
=
mal_format_converter_init_
separated
(
&
config
,
converter_test_separat
ed_callback
,
&
sineWave
,
&
converter
);
result
=
mal_format_converter_init_
deinterleaved
(
&
config
,
converter_test_deinterleav
ed_callback
,
&
sineWave
,
&
converter
);
if
(
result
!=
MAL_SUCCESS
)
{
printf
(
"Failed to initialize converter.
\n
"
);
return
-
1
;
}
mal_int16
separat
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Separat
edFrames
[
MAL_MAX_CHANNELS
];
mal_int16
deinterleav
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Deinterleav
edFrames
[
MAL_MAX_CHANNELS
];
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
converter
.
config
.
channels
;
iChannel
+=
1
)
{
pp
SeparatedFrames
[
iChannel
]
=
&
separat
edFrames
[
iChannel
];
pp
DeinterleavedFrames
[
iChannel
]
=
&
deinterleav
edFrames
[
iChannel
];
}
mal_uint64
framesRead
=
mal_format_converter_read_frames_
separated
(
&
converter
,
1024
,
ppSeparat
edFrames
);
mal_uint64
framesRead
=
mal_format_converter_read_frames_
deinterleaved
(
&
converter
,
1024
,
ppDeinterleav
edFrames
);
if
(
framesRead
!=
1024
)
{
printf
(
"Failed to read interleaved data from converter.
\n
"
);
return
-
1
;
...
...
@@ -1120,7 +1120,7 @@ int do_format_converter_tests()
return
-
1
;
}
fwrite
(
pp
Separat
edFrames
[
iChannel
],
sizeof
(
mal_int16
),
framesRead
,
pFile
);
fwrite
(
pp
Deinterleav
edFrames
[
iChannel
],
sizeof
(
mal_int16
),
framesRead
,
pFile
);
fclose
(
pFile
);
}
}
...
...
@@ -1164,13 +1164,13 @@ int do_format_converter_tests()
return
-
1
;
}
float
separat
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Separat
edFrames
[
MAL_MAX_CHANNELS
];
float
deinterleav
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Deinterleav
edFrames
[
MAL_MAX_CHANNELS
];
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
converter
.
config
.
channels
;
iChannel
+=
1
)
{
pp
SeparatedFrames
[
iChannel
]
=
&
separat
edFrames
[
iChannel
];
pp
DeinterleavedFrames
[
iChannel
]
=
&
deinterleav
edFrames
[
iChannel
];
}
mal_uint64
framesRead
=
mal_format_converter_read_frames_
separated
(
&
converter
,
1024
,
ppSeparat
edFrames
);
mal_uint64
framesRead
=
mal_format_converter_read_frames_
deinterleaved
(
&
converter
,
1024
,
ppDeinterleav
edFrames
);
if
(
framesRead
!=
1024
)
{
printf
(
"Failed to read interleaved data from converter.
\n
"
);
return
-
1
;
...
...
@@ -1187,7 +1187,7 @@ int do_format_converter_tests()
return
-
1
;
}
fwrite
(
pp
Separat
edFrames
[
iChannel
],
sizeof
(
float
),
framesRead
,
pFile
);
fwrite
(
pp
Deinterleav
edFrames
[
iChannel
],
sizeof
(
float
),
framesRead
,
pFile
);
fclose
(
pFile
);
}
}
...
...
@@ -1195,7 +1195,7 @@ int do_format_converter_tests()
// Deinterleaved/Interleaved f32 to f32.
{
mal_sine_wave_init
(
amplitude
,
periodsPerSecond
,
sampleRate
,
&
sineWave
);
result
=
mal_format_converter_init_
separated
(
&
config
,
converter_test_separat
ed_callback
,
&
sineWave
,
&
converter
);
result
=
mal_format_converter_init_
deinterleaved
(
&
config
,
converter_test_deinterleav
ed_callback
,
&
sineWave
,
&
converter
);
if
(
result
!=
MAL_SUCCESS
)
{
printf
(
"Failed to initialize converter.
\n
"
);
return
-
1
;
...
...
@@ -1221,19 +1221,19 @@ int do_format_converter_tests()
// Deinterleaved/Deinterleaved f32 to f32.
{
mal_sine_wave_init
(
amplitude
,
periodsPerSecond
,
sampleRate
,
&
sineWave
);
result
=
mal_format_converter_init_
separated
(
&
config
,
converter_test_separat
ed_callback
,
&
sineWave
,
&
converter
);
result
=
mal_format_converter_init_
deinterleaved
(
&
config
,
converter_test_deinterleav
ed_callback
,
&
sineWave
,
&
converter
);
if
(
result
!=
MAL_SUCCESS
)
{
printf
(
"Failed to initialize converter.
\n
"
);
return
-
1
;
}
float
separat
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Separat
edFrames
[
MAL_MAX_CHANNELS
];
float
deinterleav
edFrames
[
MAL_MAX_CHANNELS
][
1024
];
void
*
pp
Deinterleav
edFrames
[
MAL_MAX_CHANNELS
];
for
(
mal_uint32
iChannel
=
0
;
iChannel
<
converter
.
config
.
channels
;
iChannel
+=
1
)
{
pp
SeparatedFrames
[
iChannel
]
=
&
separat
edFrames
[
iChannel
];
pp
DeinterleavedFrames
[
iChannel
]
=
&
deinterleav
edFrames
[
iChannel
];
}
mal_uint64
framesRead
=
mal_format_converter_read_frames_
separated
(
&
converter
,
1024
,
ppSeparat
edFrames
);
mal_uint64
framesRead
=
mal_format_converter_read_frames_
deinterleaved
(
&
converter
,
1024
,
ppDeinterleav
edFrames
);
if
(
framesRead
!=
1024
)
{
printf
(
"Failed to read interleaved data from converter.
\n
"
);
return
-
1
;
...
...
@@ -1250,7 +1250,7 @@ int do_format_converter_tests()
return
-
1
;
}
fwrite
(
pp
Separat
edFrames
[
iChannel
],
sizeof
(
float
),
framesRead
,
pFile
);
fwrite
(
pp
Deinterleav
edFrames
[
iChannel
],
sizeof
(
float
),
framesRead
,
pFile
);
fclose
(
pFile
);
}
}
...
...
@@ -1288,7 +1288,7 @@ int do_channel_routing_tests()
mal_get_standard_channel_map
(
mal_standard_channel_map_microsoft
,
routerConfig
.
channelsOut
,
routerConfig
.
channelMapOut
);
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
!
router
.
isPassthrough
)
{
printf
(
"Failed to init router as passthrough.
\n
"
);
...
...
@@ -1327,7 +1327,7 @@ int do_channel_routing_tests()
}
}
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
float
outputA
[
MAL_MAX_CHANNELS
][
100
];
float
outputB
[
MAL_MAX_CHANNELS
][
100
];
...
...
@@ -1339,7 +1339,7 @@ int do_channel_routing_tests()
}
// With optimizations.
mal_uint64
framesRead
=
mal_channel_router_read_frames_
separat
ed
(
&
router
,
100
,
(
void
**
)
ppOutputA
);
mal_uint64
framesRead
=
mal_channel_router_read_frames_
deinterleav
ed
(
&
router
,
100
,
(
void
**
)
ppOutputA
);
if
(
framesRead
!=
100
)
{
printf
(
"Returned frame count for optimized incorrect."
);
hasError
=
MAL_TRUE
;
...
...
@@ -1348,7 +1348,7 @@ int do_channel_routing_tests()
// Without optimizations.
router
.
isPassthrough
=
MAL_FALSE
;
router
.
isSimpleShuffle
=
MAL_FALSE
;
framesRead
=
mal_channel_router_read_frames_
separat
ed
(
&
router
,
100
,
(
void
**
)
ppOutputB
);
framesRead
=
mal_channel_router_read_frames_
deinterleav
ed
(
&
router
,
100
,
(
void
**
)
ppOutputB
);
if
(
framesRead
!=
100
)
{
printf
(
"Returned frame count for unoptimized path incorrect."
);
hasError
=
MAL_TRUE
;
...
...
@@ -1386,7 +1386,7 @@ int do_channel_routing_tests()
}
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1429,7 +1429,7 @@ int do_channel_routing_tests()
}
}
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
float
outputA
[
MAL_MAX_CHANNELS
][
100
];
float
outputB
[
MAL_MAX_CHANNELS
][
100
];
...
...
@@ -1441,7 +1441,7 @@ int do_channel_routing_tests()
}
// With optimizations.
mal_uint64
framesRead
=
mal_channel_router_read_frames_
separat
ed
(
&
router
,
100
,
(
void
**
)
ppOutputA
);
mal_uint64
framesRead
=
mal_channel_router_read_frames_
deinterleav
ed
(
&
router
,
100
,
(
void
**
)
ppOutputA
);
if
(
framesRead
!=
100
)
{
printf
(
"Returned frame count for optimized incorrect."
);
hasError
=
MAL_TRUE
;
...
...
@@ -1450,7 +1450,7 @@ int do_channel_routing_tests()
// Without optimizations.
router
.
isPassthrough
=
MAL_FALSE
;
router
.
isSimpleShuffle
=
MAL_FALSE
;
framesRead
=
mal_channel_router_read_frames_
separat
ed
(
&
router
,
100
,
(
void
**
)
ppOutputB
);
framesRead
=
mal_channel_router_read_frames_
deinterleav
ed
(
&
router
,
100
,
(
void
**
)
ppOutputB
);
if
(
framesRead
!=
100
)
{
printf
(
"Returned frame count for unoptimized path incorrect."
);
hasError
=
MAL_TRUE
;
...
...
@@ -1486,7 +1486,7 @@ int do_channel_routing_tests()
mal_get_standard_channel_map
(
mal_standard_channel_map_microsoft
,
routerConfig
.
channelsOut
,
routerConfig
.
channelMapOut
);
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1532,7 +1532,7 @@ int do_channel_routing_tests()
mal_get_standard_channel_map
(
mal_standard_channel_map_microsoft
,
routerConfig
.
channelsOut
,
routerConfig
.
channelMapOut
);
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1589,7 +1589,7 @@ int do_channel_routing_tests()
routerConfig
.
channelMapOut
[
7
]
=
MAL_CHANNEL_SIDE_RIGHT
;
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1645,7 +1645,7 @@ int do_channel_routing_tests()
ppTestData
[
1
][
iFrame
]
=
+
1
;
}
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
ppTestData
,
&
router
);
float
output
[
MAL_MAX_CHANNELS
][
100
];
float
*
ppOutput
[
MAL_MAX_CHANNELS
];
...
...
@@ -1653,7 +1653,7 @@ int do_channel_routing_tests()
ppOutput
[
iChannel
]
=
output
[
iChannel
];
}
mal_uint64
framesRead
=
mal_channel_router_read_frames_
separat
ed
(
&
router
,
100
,
(
void
**
)
ppOutput
);
mal_uint64
framesRead
=
mal_channel_router_read_frames_
deinterleav
ed
(
&
router
,
100
,
(
void
**
)
ppOutput
);
if
(
framesRead
!=
100
)
{
printf
(
"Returned frame count for optimized incorrect.
\n
"
);
hasError
=
MAL_TRUE
;
...
...
@@ -1704,7 +1704,7 @@ int do_channel_routing_tests()
routerConfig
.
channelMapOut
[
1
]
=
MAL_CHANNEL_FRONT_RIGHT
;
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1769,7 +1769,7 @@ int do_channel_routing_tests()
routerConfig
.
channelMapOut
[
3
]
=
MAL_CHANNEL_LFE
;
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
@@ -1822,7 +1822,7 @@ int do_channel_routing_tests()
routerConfig
.
channelMapOut
[
0
]
=
MAL_CHANNEL_MONO
;
mal_channel_router
router
;
mal_result
result
=
mal_channel_router_init_
separat
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
mal_result
result
=
mal_channel_router_init_
deinterleav
ed
(
&
routerConfig
,
channel_router_callback__passthrough_test
,
NULL
,
&
router
);
if
(
result
==
MAL_SUCCESS
)
{
if
(
router
.
isPassthrough
)
{
printf
(
"Router incorrectly configured as a passthrough.
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment