mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Merge branch 'dev' into dev-0.12
This commit is contained in:
+1
-6
@@ -33,7 +33,6 @@
|
||||
/tests/debugging/archive/
|
||||
/tests/*.c
|
||||
/tests/*.cpp
|
||||
/tools/_build/
|
||||
/website/docs/
|
||||
*.vcxproj.user
|
||||
.vs/
|
||||
@@ -47,8 +46,4 @@
|
||||
/research/ma_atomic.c
|
||||
/research/miniaudio_engine.c
|
||||
/tests/stress/
|
||||
/tools/codegen/miniaudio_amalgamator.c
|
||||
/tools/codegen/miniaudio_codegen_utils.c
|
||||
/tools/codegen/miniaudio_docgen.c
|
||||
/tools/codegen/miniaudio_hrtfgen.c
|
||||
/tools/codegen/miniaudio_splitter.c
|
||||
/tools/hrtfgen/
|
||||
+12
-1
@@ -1,16 +1,27 @@
|
||||
v0.11.23 - TBD
|
||||
v0.11.23 - 2025-09-11
|
||||
=====================
|
||||
* Fixed an error in `ma_channel_map_to_string()` where the output string is not null terminated correctly.
|
||||
* Fixed an error with logging due to mishandling of va_list.
|
||||
* Fixed some errors when compiling with `MA_NO_RUNTIME_LINKING`.
|
||||
* Fixed an error with `ma_sound` initialization where the initial loop points are not set correctly.
|
||||
* Fixed an alignment error with the ring buffer.
|
||||
* Fixed a memory leak in the resource manager when opening a file fails.
|
||||
* Fixed an assertion failure in the resource manager when opening a file fails.
|
||||
* Fixed a compilation warning relating to `MA_FALLTHROUGH`
|
||||
* Fixed an undefined behavior error in the s16 to s32 conversion routine.
|
||||
* Fixed an undefined behavior error relating to MurmurHash3.
|
||||
* Fixed an undefined behavior error with the LCG random number generator.
|
||||
* Fixed a compilation error with `MA_NO_SSE2`.
|
||||
* Fixed some unused function warnings.
|
||||
* Fixed a rare, but technically possible division by zero error.
|
||||
* Some const correctness fixes for `ma_sound`.
|
||||
* Improved compatibility with old versions of GCC.
|
||||
* Miscellaneous documentation fixes.
|
||||
* WAV, FLAC and MP3 decoders have been brought up to date with dr_libs. Of particular note, this should fix some long outstanding bugs with MP3 due to metadata not being handled correctly.
|
||||
* POSIX: Added a fallback for when creation of a real-time thread fails. This fallback can be disabled with `MA_NO_PTHREAD_REALTIME_PRIORITY_FALLBACK` if you need an explicit failure.
|
||||
* POSIX: pthread.h is no longer included when `MA_NO_THREADING` is defined.
|
||||
* WASAPI: Improved handling of COM initialization and shutdown to make it a bit more robust.
|
||||
* WASAPI: Fix an error due to a missing struct member.
|
||||
* PulseAudio: Fixed a crash when requesting a channel count greater than 32.
|
||||
* AAudio: Fixed a crash when uninitializing the device while in the middle of rerouting.
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ project(miniaudio VERSION ${MINIAUDIO_VERSION})
|
||||
# Options
|
||||
option(MINIAUDIO_BUILD_EXAMPLES "Build miniaudio examples" OFF)
|
||||
option(MINIAUDIO_BUILD_TESTS "Build miniaudio tests" OFF)
|
||||
option(MINIAUDIO_BUILD_TOOLS "Build miniaudio development tools. Leave this disabled unless you know what you're doing. If you enable this and you get build errors, you clearly do not know what you're doing and yet you still enabled this option. Why would you do that?" OFF)
|
||||
option(MINIAUDIO_FORCE_CXX "Force compilation as C++" OFF)
|
||||
option(MINIAUDIO_FORCE_C89 "Force compilation as C89" OFF)
|
||||
option(MINIAUDIO_NO_EXTRA_NODES "Do not build extra node graph nodes" OFF)
|
||||
@@ -869,6 +870,15 @@ if (MINIAUDIO_BUILD_EXAMPLES)
|
||||
add_miniaudio_example(miniaudio_simple_spatialization simple_spatialization.c)
|
||||
endif()
|
||||
|
||||
|
||||
# Tools
|
||||
if (MINIAUDIO_BUILD_TOOLS)
|
||||
set(TOOLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tools)
|
||||
|
||||
add_executable(madoc ${TOOLS_DIR}/madoc/madoc.c)
|
||||
endif()
|
||||
|
||||
|
||||
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(MINIAUDIO_PC_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
else()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/9vpqbjU"><img src="https://img.shields.io/discord/712952679415939085?label=discord&logo=discord&style=flat-square" alt="discord"></a>
|
||||
<a href="https://x.com/mackron"><img alt="x" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fmackron&style=flat-square&logo=x&label=%40mackron"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -32,7 +33,7 @@ Features
|
||||
- High-level API for sound management, mixing, effects and optional 3D spatialization.
|
||||
- Flexible node graph system for advanced mixing and effect processing.
|
||||
- Resource management for loading sound files.
|
||||
- Decoding, with built-in support for WAV, FLAC and MP3, in addition to being able to plug in custom decoders.
|
||||
- Decoding, with built-in support for WAV, FLAC, and MP3, in addition to being able to plug in custom decoders.
|
||||
- Encoding (WAV only).
|
||||
- Data conversion.
|
||||
- Resampling, including custom resamplers.
|
||||
@@ -206,7 +207,7 @@ Security
|
||||
========
|
||||
I deal with all security related issues publicly and transparently, and it can sometimes take a while before I
|
||||
get a chance to address it. If this is an issue for you, you need to use another library. The fastest way to get
|
||||
a bug fixed is to submit a pull request, but if this is unpractical for you please post a ticket to the public
|
||||
a bug fixed is to submit a pull request, but if this is impractical for you please post a ticket to the public
|
||||
GitHub issue tracker.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
miniaudio_h :: <../miniaudio.h>;
|
||||
miniaudio_split_h := <../extras/miniaudio_split/miniaudio.h>;
|
||||
miniaudio_split_c := <../extras/miniaudio_split/miniaudio.c>;
|
||||
|
||||
header := @(miniaudio_h["/\*" : "\*/"]);
|
||||
footer := @(miniaudio_h["/\*\RThis software" : "\*/"]);
|
||||
|
||||
content_h : string;
|
||||
content_h["$"] = header;
|
||||
content_h["$"] = "\n";
|
||||
content_h["$"] = @(miniaudio_h["#ifndef miniaudio_h" : "#endif /\* miniaudio_h \*/"]);
|
||||
content_h["$"] = "\n\n";
|
||||
content_h["$"] = footer;
|
||||
content_h["$"] = "\n";
|
||||
|
||||
content_c : string;
|
||||
content_c["$"] = header;
|
||||
content_c["$"] = "\n";
|
||||
content_c["$"] = '#include "miniaudio.h"\n\n';
|
||||
content_c["$"] = @(miniaudio_h["#ifndef miniaudio_c" : "#endif /\* miniaudio_c \*/"]);
|
||||
content_c["$"] = "\n\n";
|
||||
content_c["$"] = footer;
|
||||
content_c["$"] = "\n";
|
||||
|
||||
miniaudio_split_h = content_h;
|
||||
miniaudio_split_c = content_c;
|
||||
Vendored
+3185
-1844
File diff suppressed because it is too large
Load Diff
Vendored
+2208
-179
File diff suppressed because it is too large
Load Diff
+4048
-1898
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.22 - 2025-02-24
|
||||
miniaudio - v0.11.23 - 2025-09-11
|
||||
|
||||
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 22
|
||||
#define MA_VERSION_REVISION 23
|
||||
#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__)
|
||||
@@ -127,6 +127,8 @@ typedef ma_uint16 wchar_t;
|
||||
#define MA_SIZE_MAX 0xFFFFFFFF /* When SIZE_MAX is not defined by the standard library just default to the maximum 32-bit unsigned integer. */
|
||||
#endif
|
||||
|
||||
#define MA_UINT64_MAX (((ma_uint64)0xFFFFFFFF << 32) | (ma_uint64)0xFFFFFFFF) /* Weird shifting syntax is for VC6 compatibility. */
|
||||
|
||||
|
||||
/* Platform/backend detection. */
|
||||
#if defined(_WIN32) || defined(__COSMOPOLITAN__)
|
||||
@@ -135,29 +137,55 @@ typedef ma_uint16 wchar_t;
|
||||
#define MA_WIN32_UWP
|
||||
#elif defined(WINAPI_FAMILY) && (defined(WINAPI_FAMILY_GAMES) && WINAPI_FAMILY == WINAPI_FAMILY_GAMES)
|
||||
#define MA_WIN32_GDK
|
||||
#elif defined(NXDK)
|
||||
#define MA_WIN32_NXDK
|
||||
#else
|
||||
#define MA_WIN32_DESKTOP
|
||||
#endif
|
||||
|
||||
/* The original Xbox. */
|
||||
#if defined(NXDK) /* <-- Add other Xbox compiler toolchains here, and then add a toolchain-specific define in case we need to discriminate between them later. */
|
||||
#define MA_XBOX
|
||||
|
||||
#if defined(NXDK)
|
||||
#define MA_XBOX_NXDK
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_WIN32) /* If it's not Win32, assume POSIX. */
|
||||
#if defined(__MSDOS__) || defined(MSDOS) || defined(_MSDOS) || defined(__DOS__)
|
||||
#define MA_DOS
|
||||
|
||||
/* No threading allowed on DOS. */
|
||||
#ifndef MA_NO_THREADING
|
||||
#define MA_NO_THREADING
|
||||
#endif
|
||||
|
||||
/* No runtime linking allowed on DOS. */
|
||||
#ifndef MA_NO_RUNTIME_LINKING
|
||||
#define MA_NO_RUNTIME_LINKING
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(MA_WIN32) && !defined(MA_DOS) /* If it's not Win32, assume POSIX. */
|
||||
#define MA_POSIX
|
||||
|
||||
/*
|
||||
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
||||
You can use this to avoid including pthread.h in the header section. The downside is that it
|
||||
results in some fixed sized structures being declared for the various types that are used in
|
||||
miniaudio. The risk here is that these types might be too small for a given platform. This
|
||||
risk is yours to take and no support will be offered if you enable this option.
|
||||
*/
|
||||
#ifndef MA_NO_PTHREAD_IN_HEADER
|
||||
#include <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
|
||||
typedef pthread_t ma_pthread_t;
|
||||
typedef pthread_mutex_t ma_pthread_mutex_t;
|
||||
typedef pthread_cond_t ma_pthread_cond_t;
|
||||
#else
|
||||
typedef ma_uintptr ma_pthread_t;
|
||||
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
||||
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
||||
#if !defined(MA_NO_THREADING)
|
||||
/*
|
||||
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
||||
You can use this to avoid including pthread.h in the header section. The downside is that it
|
||||
results in some fixed sized structures being declared for the various types that are used in
|
||||
miniaudio. The risk here is that these types might be too small for a given platform. This
|
||||
risk is yours to take and no support will be offered if you enable this option.
|
||||
*/
|
||||
#ifndef MA_NO_PTHREAD_IN_HEADER
|
||||
#include <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
|
||||
typedef pthread_t ma_pthread_t;
|
||||
typedef pthread_mutex_t ma_pthread_mutex_t;
|
||||
typedef pthread_cond_t ma_pthread_cond_t;
|
||||
#else
|
||||
typedef ma_uintptr ma_pthread_t;
|
||||
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
||||
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__unix__)
|
||||
@@ -184,8 +212,11 @@ typedef ma_uint16 wchar_t;
|
||||
#if defined(__PROSPERO__)
|
||||
#define MA_PROSPERO
|
||||
#endif
|
||||
#if defined(__NX__)
|
||||
#define MA_NX
|
||||
#if defined(__3DS__)
|
||||
#define MA_3DS
|
||||
#endif
|
||||
#if defined(__SWITCH__) || defined(__NX__)
|
||||
#define MA_SWITCH
|
||||
#endif
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
#define MA_BEOS
|
||||
@@ -195,12 +226,13 @@ typedef ma_uint16 wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__has_c_attribute)
|
||||
#if __has_c_attribute(fallthrough)
|
||||
#define MA_FALLTHROUGH [[fallthrough]]
|
||||
#endif
|
||||
#if !defined(MA_FALLTHROUGH) && defined(__cplusplus) && __cplusplus >= 201703L
|
||||
#define MA_FALLTHROUGH [[fallthrough]]
|
||||
#endif
|
||||
#if !defined(MA_FALLTHROUGH) && defined(__has_attribute) && (defined(__clang__) || defined(__GNUC__))
|
||||
#if !defined(MA_FALLTHROUGH) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
|
||||
#define MA_FALLTHROUGH [[fallthrough]]
|
||||
#endif
|
||||
#if !defined(MA_FALLTHROUGH) && defined(__has_attribute)
|
||||
#if __has_attribute(fallthrough)
|
||||
#define MA_FALLTHROUGH __attribute__((fallthrough))
|
||||
#endif
|
||||
@@ -237,7 +269,7 @@ typedef ma_uint16 wchar_t;
|
||||
#define MA_NO_INLINE __attribute__((noinline))
|
||||
#else
|
||||
#define MA_INLINE MA_GNUC_INLINE_HINT
|
||||
#define MA_NO_INLINE __attribute__((noinline))
|
||||
#define MA_NO_INLINE
|
||||
#endif
|
||||
#elif defined(__WATCOMC__)
|
||||
#define MA_INLINE __inline
|
||||
@@ -620,7 +652,7 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ma_int32 state;
|
||||
ma_uint32 state;
|
||||
} ma_lcg;
|
||||
|
||||
|
||||
@@ -2839,7 +2871,7 @@ This section contains the APIs for device playback and capture. Here is where yo
|
||||
************************************************************************************************************************************************************/
|
||||
#ifndef MA_NO_DEVICE_IO
|
||||
/* Some backends are only supported on certain platforms. */
|
||||
#if defined(MA_WIN32)
|
||||
#if defined(MA_WIN32) && !defined(MA_XBOX)
|
||||
#define MA_SUPPORT_WASAPI
|
||||
|
||||
#if defined(MA_WIN32_DESKTOP) /* DirectSound and WinMM backends are only supported on desktops. */
|
||||
@@ -3696,6 +3728,7 @@ struct ma_context
|
||||
ma_proc snd_pcm_hw_params_set_rate_resample;
|
||||
ma_proc snd_pcm_hw_params_set_rate;
|
||||
ma_proc snd_pcm_hw_params_set_rate_near;
|
||||
ma_proc snd_pcm_hw_params_set_rate_minmax;
|
||||
ma_proc snd_pcm_hw_params_set_buffer_size_near;
|
||||
ma_proc snd_pcm_hw_params_set_periods_near;
|
||||
ma_proc snd_pcm_hw_params_set_access;
|
||||
@@ -4256,6 +4289,7 @@ struct ma_device
|
||||
/*AAudioStream**/ ma_ptr pStreamPlayback;
|
||||
/*AAudioStream**/ ma_ptr pStreamCapture;
|
||||
ma_mutex rerouteLock;
|
||||
ma_atomic_bool32 isTearingDown;
|
||||
ma_aaudio_usage usage;
|
||||
ma_aaudio_content_type contentType;
|
||||
ma_aaudio_input_preset inputPreset;
|
||||
@@ -7525,7 +7559,7 @@ typedef struct
|
||||
ma_log* pLog; /* When set to NULL, will use the context's log. */
|
||||
ma_uint32 listenerCount; /* Must be between 1 and MA_ENGINE_MAX_LISTENERS. */
|
||||
ma_uint32 channels; /* The number of channels to use when mixing and spatializing. When set to 0, will use the native channel count of the device. */
|
||||
ma_uint32 sampleRate; /* The sample rate. When set to 0 will use the native channel count of the device. */
|
||||
ma_uint32 sampleRate; /* The sample rate. When set to 0 will use the native sample rate of the device. */
|
||||
ma_uint32 periodSizeInFrames; /* If set to something other than 0, updates will always be exactly this size. The underlying device may be a different size, but from the perspective of the mixer that won't matter.*/
|
||||
ma_uint32 periodSizeInMilliseconds; /* Used if periodSizeInFrames is unset. */
|
||||
ma_uint32 gainSmoothTimeInFrames; /* The number of frames to interpolate the gain of spatialized sounds across. If set to 0, will use gainSmoothTimeInMilliseconds. */
|
||||
@@ -7689,11 +7723,11 @@ MA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound);
|
||||
MA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound);
|
||||
MA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */
|
||||
MA_API ma_result ma_sound_seek_to_second(ma_sound* pSound, float seekPointInSeconds); /* Abstraction to ma_sound_seek_to_pcm_frame() */
|
||||
MA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);
|
||||
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor);
|
||||
MA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength);
|
||||
MA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor);
|
||||
MA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength);
|
||||
MA_API ma_result ma_sound_get_data_format(const ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);
|
||||
MA_API ma_result ma_sound_get_cursor_in_pcm_frames(const ma_sound* pSound, ma_uint64* pCursor);
|
||||
MA_API ma_result ma_sound_get_length_in_pcm_frames(const ma_sound* pSound, ma_uint64* pLength);
|
||||
MA_API ma_result ma_sound_get_cursor_in_seconds(const ma_sound* pSound, float* pCursor);
|
||||
MA_API ma_result ma_sound_get_length_in_seconds(const ma_sound* pSound, float* pLength);
|
||||
MA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData);
|
||||
|
||||
MA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup);
|
||||
|
||||
+11
-10
@@ -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 - TBD
|
||||
miniaudio - v0.11.23 - 2025-09-11
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -14,7 +14,7 @@ GitHub: https://github.com/mackron/miniaudio
|
||||
===============
|
||||
To use miniaudio, just include "miniaudio.h" like any other header and add "miniaudio.c" to your
|
||||
source tree. If you don't want to add it to your source tree you can compile and link to it like
|
||||
any other library. Note that ABI compatiblity is not guaranteed between versions, even with bug
|
||||
any other library. Note that ABI compatibility is not guaranteed between versions, even with bug
|
||||
fix releases, so take care if compiling as a shared object.
|
||||
|
||||
miniaudio includes both low level and high level APIs. The low level API is good for those who want
|
||||
@@ -295,7 +295,7 @@ The engine encapsulates both the resource manager and the node graph to create a
|
||||
use high level API. The resource manager and node graph APIs are covered in more later sections of
|
||||
this manual.
|
||||
|
||||
The code below shows how you can initialize an engine using it's default configuration.
|
||||
The code below shows how you can initialize an engine using its default configuration.
|
||||
|
||||
```c
|
||||
ma_result result;
|
||||
@@ -383,7 +383,7 @@ Sounds are not started by default. Start a sound with `ma_sound_start()` and sto
|
||||
`ma_sound_stop()`. When a sound is stopped, it is not rewound to the start. Use
|
||||
`ma_sound_seek_to_pcm_frame(&sound, 0)` to seek back to the start of a sound. By default, starting
|
||||
and stopping sounds happens immediately, but sometimes it might be convenient to schedule the sound
|
||||
the be started and/or stopped at a specific time. This can be done with the following functions:
|
||||
to be started and/or stopped at a specific time. This can be done with the following functions:
|
||||
|
||||
```c
|
||||
ma_sound_set_start_time_in_pcm_frames()
|
||||
@@ -529,7 +529,7 @@ you'll need to disable run-time linking with `MA_NO_RUNTIME_LINKING` and link wi
|
||||
The Emscripten build emits Web Audio JavaScript directly and should compile cleanly out of the box.
|
||||
You cannot use `-std=c*` compiler flags, nor `-ansi`.
|
||||
|
||||
You can enable the use of AudioWorkets by defining `MA_ENABLE_AUDIO_WORKLETS` and then compiling
|
||||
You can enable the use of AudioWorklets by defining `MA_ENABLE_AUDIO_WORKLETS` and then compiling
|
||||
with the following options:
|
||||
|
||||
-sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY
|
||||
@@ -872,7 +872,7 @@ read data within a certain range of the underlying data. To do this you can use
|
||||
|
||||
This is useful if you have a sound bank where many sounds are stored in the same file and you want
|
||||
the data source to only play one of those sub-sounds. Note that once the range is set, everything
|
||||
that takes a position, such as cursors and loop points, should always be relatvie to the start of
|
||||
that takes a position, such as cursors and loop points, should always be relative to the start of
|
||||
the range. When the range is set, any previously defined loop point will be reset.
|
||||
|
||||
Custom loop points can also be used with data sources. By default, data sources will loop after
|
||||
@@ -880,7 +880,7 @@ they reach the end of the data source, but if you need to loop at a specific loc
|
||||
the following:
|
||||
|
||||
```c
|
||||
result = ma_data_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames);
|
||||
result = ma_data_source_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames);
|
||||
if (result != MA_SUCCESS) {
|
||||
return result; // Failed to set the loop point.
|
||||
}
|
||||
@@ -46897,7 +46897,7 @@ static MA_INLINE void ma_pcm_s16_to_s32__reference(void* dst, const void* src, m
|
||||
|
||||
ma_uint64 i;
|
||||
for (i = 0; i < count; i += 1) {
|
||||
dst_s32[i] = src_s16[i] << 16;
|
||||
dst_s32[i] = (ma_int32)src_s16[i] << 16;
|
||||
}
|
||||
|
||||
(void)ditherMode;
|
||||
@@ -63224,7 +63224,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 0
|
||||
#define MA_DR_WAV_VERSION_REVISION 1
|
||||
#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
|
||||
@@ -63657,7 +63657,7 @@ extern "C" {
|
||||
#define MA_DR_FLAC_XSTRINGIFY(x) MA_DR_FLAC_STRINGIFY(x)
|
||||
#define MA_DR_FLAC_VERSION_MAJOR 0
|
||||
#define MA_DR_FLAC_VERSION_MINOR 13
|
||||
#define MA_DR_FLAC_VERSION_REVISION 0
|
||||
#define MA_DR_FLAC_VERSION_REVISION 1
|
||||
#define MA_DR_FLAC_VERSION_STRING MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MAJOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MINOR) "." MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_REVISION)
|
||||
#include <stddef.h>
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
@@ -95593,6 +95593,7 @@ static ma_bool32 ma_dr_mp3_init_internal(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc on
|
||||
pMP3->pcmFramesRemainingInMP3Frame = 0;
|
||||
pMP3->streamStartOffset += (ma_uint32)(firstFrameInfo.frame_bytes);
|
||||
pMP3->streamCursor = pMP3->streamStartOffset;
|
||||
ma_dr_mp3dec_init(&pMP3->decoder);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
+2018
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user