@@ -8428,7 +8428,7 @@ The returned pointers will become invalid upon the next call this this function,
8428
8428
8429
8429
See Also
8430
8430
--------
8431
- ma_context_get_devices ()
8431
+ ma_context_enumerate_devices ()
8432
8432
*/
8433
8433
MA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount);
8434
8434
@@ -57368,6 +57368,10 @@ MA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_da
57368
57368
return MA_INVALID_ARGS;
57369
57369
}
57370
57370
57371
+ if (pConfig->vtable == NULL) {
57372
+ return MA_INVALID_ARGS;
57373
+ }
57374
+
57371
57375
pDataSourceBase->vtable = pConfig->vtable;
57372
57376
pDataSourceBase->rangeBegInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG;
57373
57377
pDataSourceBase->rangeEndInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END;
@@ -57433,6 +57437,8 @@ static ma_result ma_data_source_read_pcm_frames_within_range(ma_data_source* pDa
57433
57437
return MA_INVALID_ARGS;
57434
57438
}
57435
57439
57440
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57441
+
57436
57442
if ((pDataSourceBase->vtable->flags & MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT) != 0 || (pDataSourceBase->rangeEndInFrames == ~((ma_uint64)0) && (pDataSourceBase->loopEndInFrames == ~((ma_uint64)0) || loop == MA_FALSE))) {
57437
57443
/* Either the data source is self-managing the range, or no range is set - just read like normal. The data source itself will tell us when the end is reached. */
57438
57444
result = pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, &framesRead);
@@ -57656,6 +57662,8 @@ MA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, m
57656
57662
return MA_INVALID_OPERATION; /* Trying to seek to far forward. */
57657
57663
}
57658
57664
57665
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57666
+
57659
57667
return pDataSourceBase->vtable->onSeek(pDataSource, pDataSourceBase->rangeBegInFrames + frameIndex);
57660
57668
}
57661
57669
@@ -57685,6 +57693,8 @@ MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_
57685
57693
return MA_INVALID_ARGS;
57686
57694
}
57687
57695
57696
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57697
+
57688
57698
if (pDataSourceBase->vtable->onGetDataFormat == NULL) {
57689
57699
return MA_NOT_IMPLEMENTED;
57690
57700
}
@@ -57725,6 +57735,8 @@ MA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSo
57725
57735
return MA_SUCCESS;
57726
57736
}
57727
57737
57738
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57739
+
57728
57740
if (pDataSourceBase->vtable->onGetCursor == NULL) {
57729
57741
return MA_NOT_IMPLEMENTED;
57730
57742
}
@@ -57758,6 +57770,8 @@ MA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSo
57758
57770
return MA_INVALID_ARGS;
57759
57771
}
57760
57772
57773
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57774
+
57761
57775
/*
57762
57776
If we have a range defined we'll use that to determine the length. This is one of rare times
57763
57777
where we'll actually trust the caller. If they've set the range, I think it's mostly safe to
@@ -57845,6 +57859,8 @@ MA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool
57845
57859
57846
57860
ma_atomic_exchange_32(&pDataSourceBase->isLooping, isLooping);
57847
57861
57862
+ MA_ASSERT(pDataSourceBase->vtable != NULL);
57863
+
57848
57864
/* If there's no callback for this just treat it as a successful no-op. */
57849
57865
if (pDataSourceBase->vtable->onSetLooping == NULL) {
57850
57866
return MA_SUCCESS;
@@ -60396,7 +60412,7 @@ extern "C" {
60396
60412
#define MA_DR_FLAC_XSTRINGIFY(x) MA_DR_FLAC_STRINGIFY(x)
60397
60413
#define MA_DR_FLAC_VERSION_MAJOR 0
60398
60414
#define MA_DR_FLAC_VERSION_MINOR 12
60399
- #define MA_DR_FLAC_VERSION_REVISION 42
60415
+ #define MA_DR_FLAC_VERSION_REVISION 43
60400
60416
#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)
60401
60417
#include <stddef.h>
60402
60418
#if defined(_MSC_VER) && _MSC_VER >= 1700
@@ -60683,7 +60699,7 @@ extern "C" {
60683
60699
#define MA_DR_MP3_XSTRINGIFY(x) MA_DR_MP3_STRINGIFY(x)
60684
60700
#define MA_DR_MP3_VERSION_MAJOR 0
60685
60701
#define MA_DR_MP3_VERSION_MINOR 6
60686
- #define MA_DR_MP3_VERSION_REVISION 39
60702
+ #define MA_DR_MP3_VERSION_REVISION 40
60687
60703
#define MA_DR_MP3_VERSION_STRING MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MAJOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MINOR) "." MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_REVISION)
60688
60704
#include <stddef.h>
60689
60705
#define MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME 1152
@@ -85544,6 +85560,7 @@ static ma_bool32 ma_dr_flac__read_subframe_header(ma_dr_flac_bs* bs, ma_dr_flac_
85544
85560
if ((header & 0x80) != 0) {
85545
85561
return MA_FALSE;
85546
85562
}
85563
+ pSubframe->lpcOrder = 0;
85547
85564
type = (header & 0x7E) >> 1;
85548
85565
if (type == 0) {
85549
85566
pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_CONSTANT;
@@ -85601,6 +85618,9 @@ static ma_bool32 ma_dr_flac__decode_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame
85601
85618
}
85602
85619
subframeBitsPerSample -= pSubframe->wastedBitsPerSample;
85603
85620
pSubframe->pSamplesS32 = pDecodedSamplesOut;
85621
+ if (frame->header.blockSizeInPCMFrames < pSubframe->lpcOrder) {
85622
+ return MA_FALSE;
85623
+ }
85604
85624
switch (pSubframe->subframeType)
85605
85625
{
85606
85626
case MA_DR_FLAC_SUBFRAME_CONSTANT:
@@ -90318,7 +90338,7 @@ MA_API const char* ma_dr_mp3_version_string(void)
90318
90338
#define MA_DR_MP3_MIN(a, b) ((a) > (b) ? (b) : (a))
90319
90339
#define MA_DR_MP3_MAX(a, b) ((a) < (b) ? (b) : (a))
90320
90340
#if !defined(MA_DR_MP3_NO_SIMD)
90321
- #if !defined(MA_DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64))
90341
+ #if !defined(MA_DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) )
90322
90342
#define MA_DR_MP3_ONLY_SIMD
90323
90343
#endif
90324
90344
#if ((defined(_MSC_VER) && _MSC_VER >= 1400) && defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)))
@@ -90391,7 +90411,7 @@ static int ma_dr_mp3_have_simd(void)
90391
90411
return g_have_simd - 1;
90392
90412
#endif
90393
90413
}
90394
- #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
90414
+ #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
90395
90415
#include <arm_neon.h>
90396
90416
#define MA_DR_MP3_HAVE_SSE 0
90397
90417
#define MA_DR_MP3_HAVE_SIMD 1
@@ -90420,7 +90440,7 @@ static int ma_dr_mp3_have_simd(void)
90420
90440
#else
90421
90441
#define MA_DR_MP3_HAVE_SIMD 0
90422
90442
#endif
90423
- #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(__ARM_ARCH_6M__)
90443
+ #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(_M_ARM64EC) && !defined( __ARM_ARCH_6M__)
90424
90444
#define MA_DR_MP3_HAVE_ARMV6 1
90425
90445
static __inline__ __attribute__((always_inline)) ma_int32 ma_dr_mp3_clip_int16_arm(ma_int32 a)
90426
90446
{
0 commit comments