Stop using MA_ASSERT in examples.

This is useful because MA_ASSERT is only defined in the implementation
section of miniaudio.h which can cause issues when people copy/paste
the code and use it in a file that does not have visibility of the
implementation.

Note that there are still more references to implementation-defined
macros, but these have been moved to the public section in the dev-0.12
branch so I'm not bothering to change those just yet.

Public issue https://github.com/mackron/miniaudio/issues/787
This commit is contained in:
David Reid
2023-12-17 08:42:19 +10:00
parent c29c001840
commit 766a155fb3
14 changed files with 48 additions and 74 deletions
+3 -1
View File
@@ -49,7 +49,9 @@ ma_decoder* g_pDecoders;
static ma_data_source* next_callback_tail(ma_data_source* pDataSource)
{
MA_ASSERT(g_decoderCount > 0); /* <-- We check for this in main() so should never happen. */
if (g_decoderCount > 0) { /* <-- We check for this in main() so should never happen. */
return NULL;
}
/*
This will be fired when the last item in the chain has reached the end. In this example we want