mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Update split version.
This commit is contained in:
+459
-278
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
miniaudio - v0.11.23 - 2025-09-11
|
||||
miniaudio - v0.11.24 - 2026-01-17
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -20,7 +20,7 @@ extern "C" {
|
||||
|
||||
#define MA_VERSION_MAJOR 0
|
||||
#define MA_VERSION_MINOR 11
|
||||
#define MA_VERSION_REVISION 23
|
||||
#define MA_VERSION_REVISION 24
|
||||
#define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION)
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
@@ -131,7 +131,7 @@ typedef ma_uint16 wchar_t;
|
||||
|
||||
|
||||
/* Platform/backend detection. */
|
||||
#if defined(_WIN32) || defined(__COSMOPOLITAN__)
|
||||
#if defined(_WIN32)
|
||||
#define MA_WIN32
|
||||
#if defined(MA_FORCE_UWP) || (defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || (defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)))
|
||||
#define MA_WIN32_UWP
|
||||
@@ -455,9 +455,13 @@ typedef enum
|
||||
MA_CHANNEL_AUX_29 = 49,
|
||||
MA_CHANNEL_AUX_30 = 50,
|
||||
MA_CHANNEL_AUX_31 = 51,
|
||||
|
||||
/* Count. */
|
||||
MA_CHANNEL_POSITION_COUNT,
|
||||
|
||||
/* Aliases. */
|
||||
MA_CHANNEL_LEFT = MA_CHANNEL_FRONT_LEFT,
|
||||
MA_CHANNEL_RIGHT = MA_CHANNEL_FRONT_RIGHT,
|
||||
MA_CHANNEL_POSITION_COUNT = (MA_CHANNEL_AUX_31 + 1)
|
||||
} _ma_channel_position; /* Do not use `_ma_channel_position` directly. Use `ma_channel` instead. */
|
||||
|
||||
typedef enum
|
||||
@@ -2877,16 +2881,12 @@ This section contains the APIs for device playback and capture. Here is where yo
|
||||
#if defined(MA_WIN32_DESKTOP) /* DirectSound and WinMM backends are only supported on desktops. */
|
||||
#define MA_SUPPORT_DSOUND
|
||||
#define MA_SUPPORT_WINMM
|
||||
|
||||
/* Don't enable JACK here if compiling with Cosmopolitan. It'll be enabled in the Linux section below. */
|
||||
#if !defined(__COSMOPOLITAN__)
|
||||
#define MA_SUPPORT_JACK /* JACK is technically supported on Windows, but I don't know how many people use it in practice... */
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(MA_UNIX) && !defined(MA_ORBIS) && !defined(MA_PROSPERO)
|
||||
#if defined(MA_LINUX)
|
||||
#if !defined(MA_ANDROID) && !defined(__COSMOPOLITAN__) /* ALSA is not supported on Android. */
|
||||
#if !defined(MA_ANDROID) && !defined(MA_EMSCRIPTEN) /* ALSA is not supported on Android. */
|
||||
#define MA_SUPPORT_ALSA
|
||||
#endif
|
||||
#endif
|
||||
@@ -5948,7 +5948,7 @@ Parameters
|
||||
----------
|
||||
pBackends (out, optional)
|
||||
A pointer to the buffer that will receive the enabled backends. Set to NULL to retrieve the backend count. Setting
|
||||
the capacity of the buffer to `MA_BUFFER_COUNT` will guarantee it's large enough for all backends.
|
||||
the capacity of the buffer to `MA_BACKEND_COUNT` will guarantee it's large enough for all backends.
|
||||
|
||||
backendCap (in)
|
||||
The capacity of the `pBackends` buffer.
|
||||
@@ -6793,6 +6793,7 @@ typedef struct
|
||||
ma_decoding_backend_vtable** ppCustomDecodingBackendVTables;
|
||||
ma_uint32 customDecodingBackendCount;
|
||||
void* pCustomDecodingBackendUserData;
|
||||
ma_resampler_config resampling;
|
||||
} ma_resource_manager_config;
|
||||
|
||||
MA_API ma_resource_manager_config ma_resource_manager_config_init(void);
|
||||
@@ -7120,6 +7121,7 @@ MA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void*
|
||||
MA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph);
|
||||
MA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph);
|
||||
MA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime);
|
||||
MA_API ma_uint32 ma_node_graph_get_processing_size_in_frames(const ma_node_graph* pNodeGraph);
|
||||
|
||||
|
||||
|
||||
@@ -7427,6 +7429,7 @@ typedef struct
|
||||
ma_bool8 isPitchDisabled; /* Pitching can be explicitly disabled with MA_SOUND_FLAG_NO_PITCH to optimize processing. */
|
||||
ma_bool8 isSpatializationDisabled; /* Spatialization can be explicitly disabled with MA_SOUND_FLAG_NO_SPATIALIZATION. */
|
||||
ma_uint8 pinnedListenerIndex; /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */
|
||||
ma_resampler_config resampling;
|
||||
} ma_engine_node_config;
|
||||
|
||||
MA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags);
|
||||
@@ -7441,7 +7444,7 @@ typedef struct
|
||||
ma_uint32 volumeSmoothTimeInPCMFrames;
|
||||
ma_mono_expansion_mode monoExpansionMode;
|
||||
ma_fader fader;
|
||||
ma_linear_resampler resampler; /* For pitch shift. */
|
||||
ma_resampler resampler; /* For pitch shift. */
|
||||
ma_spatializer spatializer;
|
||||
ma_panner panner;
|
||||
ma_gainer volumeGainer; /* This will only be used if volumeSmoothTimeInPCMFrames is > 0. */
|
||||
@@ -7497,6 +7500,7 @@ typedef struct
|
||||
ma_uint64 loopPointEndInPCMFrames;
|
||||
ma_sound_end_proc endCallback; /* Fired when the sound reaches the end. Will be fired from the audio thread. Do not restart, uninitialize or otherwise change the state of the sound from here. Instead fire an event or set a variable to indicate to a different thread to change the start of the sound. Will not be fired in response to a scheduled stop with ma_sound_set_stop_time_*(). */
|
||||
void* pEndCallbackUserData;
|
||||
ma_resampler_config pitchResampling;
|
||||
#ifndef MA_NO_RESOURCE_MANAGER
|
||||
ma_resource_manager_pipeline_notifications initNotifications;
|
||||
#endif
|
||||
@@ -7515,6 +7519,9 @@ struct ma_sound
|
||||
MA_ATOMIC(4, ma_bool32) atEnd;
|
||||
ma_sound_end_proc endCallback;
|
||||
void* pEndCallbackUserData;
|
||||
float* pProcessingCache; /* Will be null if pDataSource is null. */
|
||||
ma_uint32 processingCacheFramesRemaining;
|
||||
ma_uint32 processingCacheCap;
|
||||
ma_bool8 ownsDataSource;
|
||||
|
||||
/*
|
||||
@@ -7573,6 +7580,8 @@ typedef struct
|
||||
ma_vfs* pResourceManagerVFS; /* A pointer to a pre-allocated VFS object to use with the resource manager. This is ignored if pResourceManager is not NULL. */
|
||||
ma_engine_process_proc onProcess; /* Fired at the end of each call to ma_engine_read_pcm_frames(). For engine's that manage their own internal device (the default configuration), this will be fired from the audio thread, and you do not need to call ma_engine_read_pcm_frames() manually in order to trigger this. */
|
||||
void* pProcessUserData; /* User data that's passed into onProcess. */
|
||||
ma_resampler_config resourceManagerResampling; /* The resampling config to use with the resource manager. */
|
||||
ma_resampler_config pitchResampling; /* The resampling config for the pitch and Doppler effects. You will typically want this to be a fast resampler. For high quality stuff, it's recommended that you pre-resample. */
|
||||
} ma_engine_config;
|
||||
|
||||
MA_API ma_engine_config ma_engine_config_init(void);
|
||||
@@ -7602,6 +7611,7 @@ struct ma_engine
|
||||
ma_mono_expansion_mode monoExpansionMode;
|
||||
ma_engine_process_proc onProcess;
|
||||
void* pProcessUserData;
|
||||
ma_resampler_config pitchResamplingConfig;
|
||||
};
|
||||
|
||||
MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine);
|
||||
@@ -7662,8 +7672,12 @@ MA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound);
|
||||
MA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound);
|
||||
MA_API ma_result ma_sound_start(ma_sound* pSound);
|
||||
MA_API ma_result ma_sound_stop(ma_sound* pSound);
|
||||
MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */
|
||||
MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. */
|
||||
MA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. If you want to restart the sound, first reset it with `ma_sound_reset_stop_time_and_fade()`. There are plans to make this less awkward in the future. */
|
||||
MA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInFrames); /* Will overwrite any scheduled stop and fade. If you want to restart the sound, first reset it with `ma_sound_reset_stop_time_and_fade()`. There are plans to make this less awkward in the future. */
|
||||
MA_API void ma_sound_reset_start_time(ma_sound* pSound);
|
||||
MA_API void ma_sound_reset_stop_time(ma_sound* pSound);
|
||||
MA_API void ma_sound_reset_fade(ma_sound* pSound);
|
||||
MA_API void ma_sound_reset_stop_time_and_fade(ma_sound* pSound); /* Resets fades and scheduled stop time. Does not seek back to the start. */
|
||||
MA_API void ma_sound_set_volume(ma_sound* pSound, float volume);
|
||||
MA_API float ma_sound_get_volume(const ma_sound* pSound);
|
||||
MA_API void ma_sound_set_pan(ma_sound* pSound, float pan);
|
||||
|
||||
Reference in New Issue
Block a user