mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9634bedb5b | |||
| b113d498a5 | |||
| 1078dc292a | |||
| b33eb2ea4f | |||
| a6a7a76e6f | |||
| 20c9f7fe0a | |||
| ce05296055 | |||
| dec6c16539 | |||
| 13d161bc8d |
@@ -1,3 +1,10 @@
|
||||
v0.11.25 - 2026-03-04
|
||||
=====================
|
||||
* Bug fixes to the WAV decoder.
|
||||
* Fixed warnings with the Emscripten build relating to the renaming of of `__EMSCRIPTEN_major/minor/tiny__` macros.
|
||||
* Win32: Fixed an error with runtime linking on the UWP build. This is actually a non issue in practice because it would require miniaudio to pass in a DLL name of longer than 2048 characters which it never does.
|
||||
|
||||
|
||||
v0.11.24 - 2026-01-17
|
||||
=====================
|
||||
* Fixed a possible glitch when processing the audio of a `ma_sound` when doing resampling.
|
||||
|
||||
+552
-351
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.25 - 2026-03-04
|
||||
|
||||
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 25
|
||||
#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
|
||||
#define MA_SUPPORT_JACK /* JACK is technically supported on Windows, but I don't know how many people use it in practice... */
|
||||
#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,7 +7519,10 @@ struct ma_sound
|
||||
MA_ATOMIC(4, ma_bool32) atEnd;
|
||||
ma_sound_end_proc endCallback;
|
||||
void* pEndCallbackUserData;
|
||||
ma_bool8 ownsDataSource;
|
||||
float* pProcessingCache; /* Will be null if pDataSource is null. */
|
||||
ma_uint32 processingCacheFramesRemaining;
|
||||
ma_uint32 processingCacheCap;
|
||||
ma_bool8 ownsDataSource;
|
||||
|
||||
/*
|
||||
We're declaring a resource manager data source object here to save us a malloc when loading a
|
||||
@@ -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);
|
||||
@@ -7825,7 +7839,7 @@ For more information, please refer to <http://unlicense.org/>
|
||||
===============================================================================
|
||||
ALTERNATIVE 2 - MIT No Attribution
|
||||
===============================================================================
|
||||
Copyright 2025 David Reid
|
||||
Copyright 2026 David Reid
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
+47
-27
@@ -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.24 - 2026-01-17
|
||||
miniaudio - v0.11.25 - 2026-03-04
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -3747,7 +3747,7 @@ extern "C" {
|
||||
|
||||
#define MA_VERSION_MAJOR 0
|
||||
#define MA_VERSION_MINOR 11
|
||||
#define MA_VERSION_REVISION 24
|
||||
#define MA_VERSION_REVISION 25
|
||||
#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__)
|
||||
@@ -19358,7 +19358,7 @@ MA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename)
|
||||
#else
|
||||
/* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */
|
||||
WCHAR filenameW[4096];
|
||||
if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) {
|
||||
if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, ma_countof(filenameW)) == 0) {
|
||||
handle = NULL;
|
||||
} else {
|
||||
handle = (ma_handle)LoadPackagedLibrary(filenameW, 0);
|
||||
@@ -41495,18 +41495,37 @@ Web Audio Backend
|
||||
#ifdef MA_HAS_WEBAUDIO
|
||||
#include <emscripten/emscripten.h>
|
||||
|
||||
#if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 32)))
|
||||
#ifndef MA_EMSCRIPTEN_MAJOR
|
||||
#if defined(__EMSCRIPTEN_MAJOR__)
|
||||
#define MA_EMSCRIPTEN_MAJOR __EMSCRIPTEN_MAJOR__
|
||||
#else
|
||||
#define MA_EMSCRIPTEN_MAJOR __EMSCRIPTEN_major__
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MA_EMSCRIPTEN_MINOR
|
||||
#if defined(__EMSCRIPTEN_MINOR__)
|
||||
#define MA_EMSCRIPTEN_MINOR __EMSCRIPTEN_MINOR__
|
||||
#else
|
||||
#define MA_EMSCRIPTEN_MINOR __EMSCRIPTEN_minor__
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MA_EMSCRIPTEN_TINY
|
||||
#if defined(__EMSCRIPTEN_TINY__)
|
||||
#define MA_EMSCRIPTEN_TINY __EMSCRIPTEN_TINY__
|
||||
#else
|
||||
#define MA_EMSCRIPTEN_TINY __EMSCRIPTEN_tiny__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (MA_EMSCRIPTEN_MAJOR > 3) || (MA_EMSCRIPTEN_MAJOR == 3 && (MA_EMSCRIPTEN_MINOR > 1 || (MA_EMSCRIPTEN_MINOR == 1 && MA_EMSCRIPTEN_TINY >= 32)))
|
||||
#include <emscripten/webaudio.h>
|
||||
#define MA_SUPPORT_AUDIO_WORKLETS
|
||||
|
||||
#if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 70)))
|
||||
#if (MA_EMSCRIPTEN_MAJOR > 3) || (MA_EMSCRIPTEN_MAJOR == 3 && (MA_EMSCRIPTEN_MINOR > 1 || (MA_EMSCRIPTEN_MINOR == 1 && MA_EMSCRIPTEN_TINY >= 70)))
|
||||
#define MA_SUPPORT_AUDIO_WORKLETS_VARIABLE_BUFFER_SIZE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
TODO: Version 0.12: Swap this logic around so that AudioWorklets are used by default. Add MA_NO_AUDIO_WORKLETS.
|
||||
*/
|
||||
#if defined(MA_ENABLE_AUDIO_WORKLETS) && defined(MA_SUPPORT_AUDIO_WORKLETS)
|
||||
#define MA_USE_AUDIO_WORKLETS
|
||||
#endif
|
||||
@@ -59243,6 +59262,10 @@ static ma_result ma_data_source_read_pcm_frames_within_range(ma_data_source* pDa
|
||||
ma_uint64 framesRead = 0;
|
||||
ma_bool32 loop = ma_data_source_is_looping(pDataSource);
|
||||
|
||||
if (pFramesRead != NULL) {
|
||||
*pFramesRead = 0;
|
||||
}
|
||||
|
||||
if (pDataSourceBase == NULL) {
|
||||
return MA_AT_END;
|
||||
}
|
||||
@@ -61921,7 +61944,7 @@ extern "C" {
|
||||
#define MA_DR_WAV_XSTRINGIFY(x) MA_DR_WAV_STRINGIFY(x)
|
||||
#define MA_DR_WAV_VERSION_MAJOR 0
|
||||
#define MA_DR_WAV_VERSION_MINOR 14
|
||||
#define MA_DR_WAV_VERSION_REVISION 4
|
||||
#define MA_DR_WAV_VERSION_REVISION 5
|
||||
#define MA_DR_WAV_VERSION_STRING MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MAJOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MINOR) "." MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_REVISION)
|
||||
#include <stddef.h>
|
||||
#define MA_DR_WAVE_FORMAT_PCM 0x1
|
||||
@@ -80503,6 +80526,13 @@ MA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_pa
|
||||
MA_DR_WAV_ASSERT(pChunkHeader != NULL);
|
||||
if (pMetadata != NULL && bytesJustRead == sizeof(smplHeaderData)) {
|
||||
ma_uint32 iSampleLoop;
|
||||
ma_uint32 loopCount;
|
||||
ma_uint32 calculatedLoopCount;
|
||||
loopCount = ma_dr_wav_bytes_to_u32(smplHeaderData + 28);
|
||||
calculatedLoopCount = (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES;
|
||||
if (loopCount != calculatedLoopCount) {
|
||||
return totalBytesRead;
|
||||
}
|
||||
pMetadata->type = ma_dr_wav_metadata_type_smpl;
|
||||
pMetadata->data.smpl.manufacturerId = ma_dr_wav_bytes_to_u32(smplHeaderData + 0);
|
||||
pMetadata->data.smpl.productId = ma_dr_wav_bytes_to_u32(smplHeaderData + 4);
|
||||
@@ -80513,7 +80543,7 @@ MA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_pa
|
||||
pMetadata->data.smpl.smpteOffset = ma_dr_wav_bytes_to_u32(smplHeaderData + 24);
|
||||
pMetadata->data.smpl.sampleLoopCount = ma_dr_wav_bytes_to_u32(smplHeaderData + 28);
|
||||
pMetadata->data.smpl.samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(smplHeaderData + 32);
|
||||
if (pMetadata->data.smpl.sampleLoopCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES) {
|
||||
if (pMetadata->data.smpl.sampleLoopCount == calculatedLoopCount) {
|
||||
pMetadata->data.smpl.pLoops = (ma_dr_wav_smpl_loop*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_smpl_loop) * pMetadata->data.smpl.sampleLoopCount, MA_DR_WAV_METADATA_ALIGNMENT);
|
||||
for (iSampleLoop = 0; iSampleLoop < pMetadata->data.smpl.sampleLoopCount; ++iSampleLoop) {
|
||||
ma_uint8 smplLoopData[MA_DR_WAV_SMPL_LOOP_BYTES];
|
||||
@@ -80534,6 +80564,8 @@ MA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_pa
|
||||
MA_DR_WAV_ASSERT(pMetadata->data.smpl.pSamplerSpecificData != NULL);
|
||||
ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, &totalBytesRead);
|
||||
}
|
||||
} else {
|
||||
MA_DR_WAV_ZERO_OBJECT(&pMetadata->data.smpl);
|
||||
}
|
||||
}
|
||||
return totalBytesRead;
|
||||
@@ -83149,19 +83181,13 @@ MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_
|
||||
newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;
|
||||
newSample0 += nibble0 * pWav->msadpcm.delta[0];
|
||||
newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767);
|
||||
pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8;
|
||||
if (pWav->msadpcm.delta[0] < 16) {
|
||||
pWav->msadpcm.delta[0] = 16;
|
||||
}
|
||||
pWav->msadpcm.delta[0] = (ma_int32)ma_dr_wav_clamp(((ma_int64)adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8, 16, 0x7FFFFFFF);
|
||||
pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];
|
||||
pWav->msadpcm.prevFrames[0][1] = newSample0;
|
||||
newSample1 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;
|
||||
newSample1 += nibble1 * pWav->msadpcm.delta[0];
|
||||
newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767);
|
||||
pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[0]) >> 8;
|
||||
if (pWav->msadpcm.delta[0] < 16) {
|
||||
pWav->msadpcm.delta[0] = 16;
|
||||
}
|
||||
pWav->msadpcm.delta[0] = (ma_int32)ma_dr_wav_clamp(((ma_int64)adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[0]) >> 8, 16, 0x7FFFFFFF);
|
||||
pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];
|
||||
pWav->msadpcm.prevFrames[0][1] = newSample1;
|
||||
pWav->msadpcm.cachedFrames[2] = newSample0;
|
||||
@@ -83176,10 +83202,7 @@ MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_
|
||||
newSample0 = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;
|
||||
newSample0 += nibble0 * pWav->msadpcm.delta[0];
|
||||
newSample0 = ma_dr_wav_clamp(newSample0, -32768, 32767);
|
||||
pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8;
|
||||
if (pWav->msadpcm.delta[0] < 16) {
|
||||
pWav->msadpcm.delta[0] = 16;
|
||||
}
|
||||
pWav->msadpcm.delta[0] = (ma_int32)ma_dr_wav_clamp(((ma_int64)adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8, 16, 0x7FFFFFFF);
|
||||
pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];
|
||||
pWav->msadpcm.prevFrames[0][1] = newSample0;
|
||||
if (pWav->msadpcm.predictor[1] >= ma_dr_wav_countof(coeff1Table) || pWav->msadpcm.predictor[1] >= ma_dr_wav_countof(coeff2Table)) {
|
||||
@@ -83188,10 +83211,7 @@ MA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_
|
||||
newSample1 = ((pWav->msadpcm.prevFrames[1][1] * coeff1Table[pWav->msadpcm.predictor[1]]) + (pWav->msadpcm.prevFrames[1][0] * coeff2Table[pWav->msadpcm.predictor[1]])) >> 8;
|
||||
newSample1 += nibble1 * pWav->msadpcm.delta[1];
|
||||
newSample1 = ma_dr_wav_clamp(newSample1, -32768, 32767);
|
||||
pWav->msadpcm.delta[1] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[1]) >> 8;
|
||||
if (pWav->msadpcm.delta[1] < 16) {
|
||||
pWav->msadpcm.delta[1] = 16;
|
||||
}
|
||||
pWav->msadpcm.delta[1] = (ma_int32)ma_dr_wav_clamp(((ma_int64)adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[1]) >> 8, 16, 0x7FFFFFFF);
|
||||
pWav->msadpcm.prevFrames[1][0] = pWav->msadpcm.prevFrames[1][1];
|
||||
pWav->msadpcm.prevFrames[1][1] = newSample1;
|
||||
pWav->msadpcm.cachedFrames[2] = newSample0;
|
||||
@@ -95825,7 +95845,7 @@ For more information, please refer to <http://unlicense.org/>
|
||||
===============================================================================
|
||||
ALTERNATIVE 2 - MIT No Attribution
|
||||
===============================================================================
|
||||
Copyright 2025 David Reid
|
||||
Copyright 2026 David Reid
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
</div>
|
||||
<table style="margin:0 auto; padding:1em 0px; text-align:center;">
|
||||
<tr>
|
||||
<td style="vertical-align:center;"><a style="padding:0;" href="https://www.reddit.com/r/miniaudio"><img src="{{ relative-path "img/reddit_white.svg" }}" style="margin:0; padding:0; height:40px; width:40px;"></a></td>
|
||||
<td style="vertical-align:center;"><a style="padding:0;" href="https://discord.gg/9vpqbjU"><img src="{{ relative-path "img/Discord-Logo-White.svg" }}" style="padding:0; height:32px; width:32px;"></a></td>
|
||||
<td rel="me" style="vertical-align:center;"><a style="padding:0;" href="https://fosstodon.org/@mackron"><img src="{{ relative-path "img/mastodon_white.svg" }}" style="padding:0; height:24px; width:32px;"></a></td>
|
||||
<td rel="me" style="vertical-align:center;"><a style="padding:0;" href="https://x.com/mackron"><img src="{{ relative-path "img/x_logo.svg" }}" style="padding:0; height:24px; width:24px;"></a></td>
|
||||
<td style="vertical-align:center;"><a style="padding:0;" href="https://github.com/mackron/miniaudio"><img src="{{ relative-path "img/github_white.png" }}" style="padding:0; height:24px; width:24px;"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -29,14 +29,11 @@
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td style="padding:0.1em; width:25%; text-align:right; vertical-align:center;">
|
||||
<a href="https://www.reddit.com/r/miniaudio"><img src="{{ relative-path "img/reddit_white.svg" }}" style="margin:0; padding:0; height:40px; width:40px;"></a>
|
||||
</td>
|
||||
<td style="padding:0.1em; width:25%; text-align:right; vertical-align:center;">
|
||||
<a href="https://discord.gg/9vpqbjU"><img src="{{ relative-path "img/Discord-Logo-White.svg" }}" style="margin:0; padding:0; height:32px; width:32px;"></a>
|
||||
</td>
|
||||
<td style="padding:0.1em; width:25%; text-align:right; vertical-align:center;">
|
||||
<a rel="me" href="https://fosstodon.org/@mackron"><img src="{{ relative-path "img/mastodon_white.svg" }}" style="margin:0; padding:0; height:24px; width:32px;"></a>
|
||||
<a rel="me" href="https://x.com/mackron"><img src="{{ relative-path "img/x_logo.svg" }}" style="margin:0; padding:0; height:24px; width:24px;"></a>
|
||||
</td>
|
||||
<td style="padding:0.1em; padding-right:1em; width:25%; text-align:right; vertical-align:center;">
|
||||
<a href="https://github.com/mackron/miniaudio"><img src="{{ relative-path "img/github_white.png" }}" style="margin:0; padding:0; height:24px; width:24px;"></a>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg width="74" height="79" viewBox="0 0 74 79" fill="white" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5"><path d="M73.7014 17.9592C72.5616 9.62034 65.1774 3.04876 56.424 1.77536C54.9472 1.56019 49.3517 0.7771 36.3901 0.7771H36.2933C23.3281 0.7771 20.5465 1.56019 19.0697 1.77536C10.56 3.01348 2.78877 8.91838 0.903306 17.356C-0.00357857 21.5113 -0.100361 26.1181 0.068112 30.3439C0.308275 36.404 0.354874 42.4535 0.91406 48.489C1.30064 52.498 1.97502 56.4751 2.93215 60.3905C4.72441 67.6217 11.9795 73.6395 19.0876 76.0945C26.6979 78.6548 34.8821 79.0799 42.724 77.3221C43.5866 77.1245 44.4398 76.8953 45.2833 76.6342C47.1867 76.0381 49.4199 75.3714 51.0616 74.2003C51.0841 74.1839 51.1026 74.1627 51.1156 74.1382C51.1286 74.1138 51.1359 74.0868 51.1368 74.0592V68.2108C51.1364 68.185 51.1302 68.1596 51.1185 68.1365C51.1069 68.1134 51.0902 68.0932 51.0695 68.0773C51.0489 68.0614 51.0249 68.0503 50.9994 68.0447C50.9738 68.0391 50.9473 68.0392 50.9218 68.045C45.8976 69.226 40.7491 69.818 35.5836 69.8087C26.694 69.8087 24.3031 65.6569 23.6184 63.9285C23.0681 62.4347 22.7186 60.8764 22.5789 59.2934C22.5775 59.2669 22.5825 59.2403 22.5934 59.216C22.6043 59.1916 22.621 59.1702 22.6419 59.1533C22.6629 59.1365 22.6876 59.1248 22.714 59.1191C22.7404 59.1134 22.7678 59.1139 22.794 59.1206C27.7345 60.2936 32.799 60.8856 37.8813 60.8843C39.1036 60.8843 40.3223 60.8843 41.5447 60.8526C46.6562 60.7115 52.0437 60.454 57.0728 59.4874C57.1983 59.4628 57.3237 59.4416 57.4313 59.4098C65.3638 57.9107 72.9128 53.2051 73.6799 41.2895C73.7086 40.8204 73.7803 36.3758 73.7803 35.889C73.7839 34.2347 74.3216 24.1533 73.7014 17.9592ZM61.4925 47.6918H53.1514V27.5855C53.1514 23.3526 51.3591 21.1938 47.7136 21.1938C43.7061 21.1938 41.6988 23.7476 41.6988 28.7919V39.7974H33.4078V28.7919C33.4078 23.7476 31.3969 21.1938 27.3894 21.1938C23.7654 21.1938 21.9552 23.3526 21.9516 27.5855V47.6918H13.6176V26.9752C13.6176 22.7423 14.7157 19.3795 16.9118 16.8868C19.1772 14.4 22.1488 13.1231 25.8373 13.1231C30.1064 13.1231 33.3325 14.7386 35.4832 17.9662L37.5587 21.3949L39.6377 17.9662C41.7884 14.7386 45.0145 13.1231 49.2765 13.1231C52.9614 13.1231 55.9329 14.4 58.2055 16.8868C60.4017 19.3772 61.4997 22.74 61.4997 26.9752L61.4925 47.6918Z" fill="inherit"></path></svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g><circle fill="none" cx="10" cy="10" r="10"/><path fill="#FFF" d="M16.67,10A1.46,1.46,0,0,0,14.2,9a7.12,7.12,0,0,0-3.85-1.23L11,4.65,13.14,5.1a1,1,0,1,0,.13-0.61L10.82,4a0.31,0.31,0,0,0-.37.24L9.71,7.71a7.14,7.14,0,0,0-3.9,1.23A1.46,1.46,0,1,0,4.2,11.33a2.87,2.87,0,0,0,0,.44c0,2.24,2.61,4.06,5.83,4.06s5.83-1.82,5.83-4.06a2.87,2.87,0,0,0,0-.44A1.46,1.46,0,0,0,16.67,10Zm-10,1a1,1,0,1,1,1,1A1,1,0,0,1,6.67,11Zm5.81,2.75a3.84,3.84,0,0,1-2.47.77,3.84,3.84,0,0,1-2.47-.77,0.27,0.27,0,0,1,.38-0.38A3.27,3.27,0,0,0,10,14a3.28,3.28,0,0,0,2.09-.61A0.27,0.27,0,1,1,12.48,13.79Zm-0.18-1.71a1,1,0,1,1,1-1A1,1,0,0,1,12.29,12.08Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 692 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="1200" height="1227" viewBox="0 0 1200 1227" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 430 B |
Reference in New Issue
Block a user