mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Fix a crash in ma_engine_init().
This happens when the pEngine parameter is NULL.
This commit is contained in:
+8
-3
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
|
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||||
miniaudio - v0.11.0 - 2021-12-18
|
miniaudio - v0.11.1 - TBD
|
||||||
|
|
||||||
David Reid - mackron@gmail.com
|
David Reid - mackron@gmail.com
|
||||||
|
|
||||||
@@ -70044,10 +70044,12 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng
|
|||||||
ma_spatializer_listener_config listenerConfig;
|
ma_spatializer_listener_config listenerConfig;
|
||||||
ma_uint32 iListener;
|
ma_uint32 iListener;
|
||||||
|
|
||||||
if (pEngine != NULL) {
|
if (pEngine == NULL) {
|
||||||
MA_ZERO_OBJECT(pEngine);
|
return MA_INVALID_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MA_ZERO_OBJECT(pEngine);
|
||||||
|
|
||||||
/* The config is allowed to be NULL in which case we use defaults for everything. */
|
/* The config is allowed to be NULL in which case we use defaults for everything. */
|
||||||
if (pConfig != NULL) {
|
if (pConfig != NULL) {
|
||||||
engineConfig = *pConfig;
|
engineConfig = *pConfig;
|
||||||
@@ -88904,6 +88906,9 @@ issues with certain devices and configurations. These can be individually enable
|
|||||||
/*
|
/*
|
||||||
REVISION HISTORY
|
REVISION HISTORY
|
||||||
================
|
================
|
||||||
|
v0.11.1 - TBD
|
||||||
|
- Fix a crash when passing in NULL for the pEngine parameter of ma_engine_init().
|
||||||
|
|
||||||
v0.11.0 - 2021-12-18
|
v0.11.0 - 2021-12-18
|
||||||
- Add a node graph system for advanced mixing and effect processing.
|
- Add a node graph system for advanced mixing and effect processing.
|
||||||
- Add a resource manager for loading and streaming sounds.
|
- Add a resource manager for loading and streaming sounds.
|
||||||
|
|||||||
Reference in New Issue
Block a user