mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Update dr_libs.
This commit is contained in:
+12
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_flac - v0.12.26 - 2021-01-17
|
||||
dr_flac - v0.12.28 - 2021-02-21
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -232,7 +232,7 @@ extern "C" {
|
||||
|
||||
#define DRFLAC_VERSION_MAJOR 0
|
||||
#define DRFLAC_VERSION_MINOR 12
|
||||
#define DRFLAC_VERSION_REVISION 26
|
||||
#define DRFLAC_VERSION_REVISION 28
|
||||
#define DRFLAC_VERSION_STRING DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
@@ -5170,7 +5170,8 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u
|
||||
DRFLAC_ASSERT(blockSize > 0);
|
||||
if (blockSize == 1) {
|
||||
header->blockSizeInPCMFrames = 192;
|
||||
} else if (blockSize >= 2 && blockSize <= 5) {
|
||||
} else if (blockSize <= 5) {
|
||||
DRFLAC_ASSERT(blockSize >= 2);
|
||||
header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2));
|
||||
} else if (blockSize == 6) {
|
||||
if (!drflac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) {
|
||||
@@ -8324,7 +8325,7 @@ static drflac_result drflac_result_from_errno(int e)
|
||||
|
||||
static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
|
||||
@@ -8336,7 +8337,7 @@ static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const ch
|
||||
return DRFLAC_INVALID_ARGS;
|
||||
}
|
||||
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drflac_result_from_errno(err);
|
||||
@@ -11805,6 +11806,12 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
|
||||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.12.28 - 2021-02-21
|
||||
- Fix a warning due to referencing _MSC_VER when it is undefined.
|
||||
|
||||
v0.12.27 - 2021-01-31
|
||||
- Fix a static analysis warning.
|
||||
|
||||
v0.12.26 - 2021-01-17
|
||||
- Fix a compilation warning due to _BSD_SOURCE being deprecated.
|
||||
|
||||
|
||||
+12
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_mp3 - v0.6.25 - 2020-12-26
|
||||
dr_mp3 - v0.6.27 - 2021-02-21
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -95,7 +95,7 @@ extern "C" {
|
||||
|
||||
#define DRMP3_VERSION_MAJOR 0
|
||||
#define DRMP3_VERSION_MINOR 6
|
||||
#define DRMP3_VERSION_REVISION 25
|
||||
#define DRMP3_VERSION_REVISION 27
|
||||
#define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
@@ -1862,7 +1862,7 @@ static void drmp3d_DCT_II(float *grbuf, int n)
|
||||
} else
|
||||
#endif
|
||||
#ifdef DR_MP3_ONLY_SIMD
|
||||
{}
|
||||
{} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */
|
||||
#else
|
||||
for (; k < n; k++)
|
||||
{
|
||||
@@ -2095,7 +2095,7 @@ static void drmp3d_synth(float *xl, drmp3d_sample_t *dstl, int nch, float *lins)
|
||||
} else
|
||||
#endif
|
||||
#ifdef DR_MP3_ONLY_SIMD
|
||||
{}
|
||||
{} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */
|
||||
#else
|
||||
for (i = 14; i >= 0; i--)
|
||||
{
|
||||
@@ -3325,7 +3325,7 @@ static drmp3_result drmp3_result_from_errno(int e)
|
||||
|
||||
static drmp3_result drmp3_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
|
||||
@@ -3337,7 +3337,7 @@ static drmp3_result drmp3_fopen(FILE** ppFile, const char* pFilePath, const char
|
||||
return DRMP3_INVALID_ARGS;
|
||||
}
|
||||
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drmp3_result_from_errno(err);
|
||||
@@ -4450,6 +4450,12 @@ counts rather than sample counts.
|
||||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.6.27 - 2021-02-21
|
||||
- Fix a warning due to referencing _MSC_VER when it is undefined.
|
||||
|
||||
v0.6.26 - 2021-01-31
|
||||
- Bring up to date with minimp3.
|
||||
|
||||
v0.6.25 - 2020-12-26
|
||||
- Remove DRMP3_DEFAULT_CHANNELS and DRMP3_DEFAULT_SAMPLE_RATE which are leftovers from some removed APIs.
|
||||
|
||||
|
||||
+24
-21
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_wav - v0.12.17 - 2021-01-17
|
||||
dr_wav - v0.12.19 - 2021-02-21
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
@@ -144,7 +144,7 @@ extern "C" {
|
||||
|
||||
#define DRWAV_VERSION_MAJOR 0
|
||||
#define DRWAV_VERSION_MINOR 12
|
||||
#define DRWAV_VERSION_REVISION 17
|
||||
#define DRWAV_VERSION_REVISION 19
|
||||
#define DRWAV_VERSION_STRING DRWAV_XSTRINGIFY(DRWAV_VERSION_MAJOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_MINOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
@@ -535,7 +535,7 @@ typedef struct
|
||||
/* The size in bytes of the data chunk. */
|
||||
drwav_uint64 dataChunkDataSize;
|
||||
|
||||
/* The position in the stream of the first byte of the data chunk. This is used for seeking. */
|
||||
/* The position in the stream of the first data byte of the data chunk. This is used for seeking. */
|
||||
drwav_uint64 dataChunkDataPos;
|
||||
|
||||
/* The number of bytes remaining in the data chunk. */
|
||||
@@ -2411,8 +2411,6 @@ DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_d
|
||||
runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign);
|
||||
runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample);
|
||||
|
||||
pWav->dataChunkDataPos = runningPos;
|
||||
|
||||
/* "data" chunk. */
|
||||
if (pFormat->container == drwav_container_riff) {
|
||||
drwav_uint32 chunkSizeDATA = (drwav_uint32)initialDataChunkSize;
|
||||
@@ -2427,19 +2425,13 @@ DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_d
|
||||
runningPos += drwav__write_u32ne_to_le(pWav, 0xFFFFFFFF); /* Always set to 0xFFFFFFFF for RF64. The true size of the data chunk is specified in the ds64 chunk. */
|
||||
}
|
||||
|
||||
/*
|
||||
The runningPos variable is incremented in the section above but is left unused which is causing some static analysis tools to detect it
|
||||
as a dead store. I'm leaving this as-is for safety just in case I want to expand this function later to include other tags and want to
|
||||
keep track of the running position for whatever reason. The line below should silence the static analysis tools.
|
||||
*/
|
||||
(void)runningPos;
|
||||
|
||||
/* Set some properties for the client's convenience. */
|
||||
pWav->container = pFormat->container;
|
||||
pWav->channels = (drwav_uint16)pFormat->channels;
|
||||
pWav->sampleRate = pFormat->sampleRate;
|
||||
pWav->bitsPerSample = (drwav_uint16)pFormat->bitsPerSample;
|
||||
pWav->translatedFormatTag = (drwav_uint16)pFormat->format;
|
||||
pWav->dataChunkDataPos = runningPos;
|
||||
|
||||
return DRWAV_TRUE;
|
||||
}
|
||||
@@ -2902,7 +2894,7 @@ DRWAV_PRIVATE drwav_result drwav_result_from_errno(int e)
|
||||
|
||||
DRWAV_PRIVATE drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
|
||||
@@ -2914,7 +2906,7 @@ DRWAV_PRIVATE drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, con
|
||||
return DRWAV_INVALID_ARGS;
|
||||
}
|
||||
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drwav_result_from_errno(err);
|
||||
@@ -3417,8 +3409,8 @@ DRWAV_API drwav_result drwav_uninit(drwav* pWav)
|
||||
drwav__write_u32ne_to_le(pWav, riffChunkSize);
|
||||
}
|
||||
|
||||
/* the "data" chunk size. */
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 4, drwav_seek_origin_start)) {
|
||||
/* The "data" chunk size. */
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, drwav_seek_origin_start)) {
|
||||
drwav_uint32 dataChunkSize = drwav__data_chunk_size_riff(pWav->dataChunkDataSize);
|
||||
drwav__write_u32ne_to_le(pWav, dataChunkSize);
|
||||
}
|
||||
@@ -3430,7 +3422,7 @@ DRWAV_API drwav_result drwav_uninit(drwav* pWav)
|
||||
}
|
||||
|
||||
/* The "data" chunk size. */
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 16, drwav_seek_origin_start)) {
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, drwav_seek_origin_start)) {
|
||||
drwav_uint64 dataChunkSize = drwav__data_chunk_size_w64(pWav->dataChunkDataSize);
|
||||
drwav__write_u64ne_to_le(pWav, dataChunkSize);
|
||||
}
|
||||
@@ -3846,7 +3838,9 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav
|
||||
|
||||
/* TODO: Lots of room for optimization here. */
|
||||
|
||||
while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
DRWAV_ASSERT(framesToRead > 0); /* This loop iteration will never get hit with framesToRead == 0 because it's asserted at the top, and we check for 0 inside the loop just below. */
|
||||
|
||||
/* If there are no cached frames we need to load a new block. */
|
||||
if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) {
|
||||
if (pWav->channels == 1) {
|
||||
@@ -3907,7 +3901,7 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav
|
||||
}
|
||||
|
||||
if (framesToRead == 0) {
|
||||
return totalFramesRead;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -4044,7 +4038,9 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uin
|
||||
|
||||
/* TODO: Lots of room for optimization here. */
|
||||
|
||||
while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
DRWAV_ASSERT(framesToRead > 0); /* This loop iteration will never get hit with framesToRead == 0 because it's asserted at the top, and we check for 0 inside the loop just below. */
|
||||
|
||||
/* If there are no cached samples we need to load a new block. */
|
||||
if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) {
|
||||
if (pWav->channels == 1) {
|
||||
@@ -4107,7 +4103,7 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uin
|
||||
}
|
||||
|
||||
if (framesToRead == 0) {
|
||||
return totalFramesRead;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6018,6 +6014,13 @@ two different ways to initialize a drwav object.
|
||||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.12.19 - 2021-02-21
|
||||
- Fix a warning due to referencing _MSC_VER when it is undefined.
|
||||
- Minor improvements to the management of some internal state concerning the data chunk cursor.
|
||||
|
||||
v0.12.18 - 2021-01-31
|
||||
- Clean up some static analysis warnings.
|
||||
|
||||
v0.12.17 - 2021-01-17
|
||||
- Minor fix to sample code in documentation.
|
||||
- Correctly qualify a private API as private rather than public.
|
||||
|
||||
+20
-18
@@ -44116,7 +44116,7 @@ extern "C" {
|
||||
#define DRWAV_XSTRINGIFY(x) DRWAV_STRINGIFY(x)
|
||||
#define DRWAV_VERSION_MAJOR 0
|
||||
#define DRWAV_VERSION_MINOR 12
|
||||
#define DRWAV_VERSION_REVISION 17
|
||||
#define DRWAV_VERSION_REVISION 19
|
||||
#define DRWAV_VERSION_STRING DRWAV_XSTRINGIFY(DRWAV_VERSION_MAJOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_MINOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_REVISION)
|
||||
#include <stddef.h>
|
||||
typedef signed char drwav_int8;
|
||||
@@ -44489,7 +44489,7 @@ extern "C" {
|
||||
#define DRFLAC_XSTRINGIFY(x) DRFLAC_STRINGIFY(x)
|
||||
#define DRFLAC_VERSION_MAJOR 0
|
||||
#define DRFLAC_VERSION_MINOR 12
|
||||
#define DRFLAC_VERSION_REVISION 26
|
||||
#define DRFLAC_VERSION_REVISION 28
|
||||
#define DRFLAC_VERSION_STRING DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)
|
||||
#include <stddef.h>
|
||||
typedef signed char drflac_int8;
|
||||
@@ -44850,7 +44850,7 @@ extern "C" {
|
||||
#define DRMP3_XSTRINGIFY(x) DRMP3_STRINGIFY(x)
|
||||
#define DRMP3_VERSION_MAJOR 0
|
||||
#define DRMP3_VERSION_MINOR 6
|
||||
#define DRMP3_VERSION_REVISION 25
|
||||
#define DRMP3_VERSION_REVISION 27
|
||||
#define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
|
||||
#include <stddef.h>
|
||||
typedef signed char drmp3_int8;
|
||||
@@ -49786,7 +49786,6 @@ DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_d
|
||||
runningPos += drwav__write_u32ne_to_le(pWav, pWav->fmt.avgBytesPerSec);
|
||||
runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign);
|
||||
runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample);
|
||||
pWav->dataChunkDataPos = runningPos;
|
||||
if (pFormat->container == drwav_container_riff) {
|
||||
drwav_uint32 chunkSizeDATA = (drwav_uint32)initialDataChunkSize;
|
||||
runningPos += drwav__write(pWav, "data", 4);
|
||||
@@ -49799,12 +49798,12 @@ DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_d
|
||||
runningPos += drwav__write(pWav, "data", 4);
|
||||
runningPos += drwav__write_u32ne_to_le(pWav, 0xFFFFFFFF);
|
||||
}
|
||||
(void)runningPos;
|
||||
pWav->container = pFormat->container;
|
||||
pWav->channels = (drwav_uint16)pFormat->channels;
|
||||
pWav->sampleRate = pFormat->sampleRate;
|
||||
pWav->bitsPerSample = (drwav_uint16)pFormat->bitsPerSample;
|
||||
pWav->translatedFormatTag = (drwav_uint16)pFormat->format;
|
||||
pWav->dataChunkDataPos = runningPos;
|
||||
return DRWAV_TRUE;
|
||||
}
|
||||
DRWAV_API drwav_bool32 drwav_init_write(drwav* pWav, const drwav_data_format* pFormat, drwav_write_proc onWrite, drwav_seek_proc onSeek, void* pUserData, const drwav_allocation_callbacks* pAllocationCallbacks)
|
||||
@@ -50250,7 +50249,7 @@ DRWAV_PRIVATE drwav_result drwav_result_from_errno(int e)
|
||||
}
|
||||
DRWAV_PRIVATE drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
if (ppFile != NULL) {
|
||||
@@ -50259,7 +50258,7 @@ DRWAV_PRIVATE drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, con
|
||||
if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {
|
||||
return DRWAV_INVALID_ARGS;
|
||||
}
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drwav_result_from_errno(err);
|
||||
@@ -50628,7 +50627,7 @@ DRWAV_API drwav_result drwav_uninit(drwav* pWav)
|
||||
drwav_uint32 riffChunkSize = drwav__riff_chunk_size_riff(pWav->dataChunkDataSize);
|
||||
drwav__write_u32ne_to_le(pWav, riffChunkSize);
|
||||
}
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 4, drwav_seek_origin_start)) {
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, drwav_seek_origin_start)) {
|
||||
drwav_uint32 dataChunkSize = drwav__data_chunk_size_riff(pWav->dataChunkDataSize);
|
||||
drwav__write_u32ne_to_le(pWav, dataChunkSize);
|
||||
}
|
||||
@@ -50637,7 +50636,7 @@ DRWAV_API drwav_result drwav_uninit(drwav* pWav)
|
||||
drwav_uint64 riffChunkSize = drwav__riff_chunk_size_w64(pWav->dataChunkDataSize);
|
||||
drwav__write_u64ne_to_le(pWav, riffChunkSize);
|
||||
}
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 16, drwav_seek_origin_start)) {
|
||||
if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, drwav_seek_origin_start)) {
|
||||
drwav_uint64 dataChunkSize = drwav__data_chunk_size_w64(pWav->dataChunkDataSize);
|
||||
drwav__write_u64ne_to_le(pWav, dataChunkSize);
|
||||
}
|
||||
@@ -50927,7 +50926,8 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav
|
||||
drwav_uint64 totalFramesRead = 0;
|
||||
DRWAV_ASSERT(pWav != NULL);
|
||||
DRWAV_ASSERT(framesToRead > 0);
|
||||
while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
DRWAV_ASSERT(framesToRead > 0);
|
||||
if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) {
|
||||
if (pWav->channels == 1) {
|
||||
drwav_uint8 header[7];
|
||||
@@ -50977,7 +50977,7 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav
|
||||
pWav->msadpcm.cachedFrameCount -= 1;
|
||||
}
|
||||
if (framesToRead == 0) {
|
||||
return totalFramesRead;
|
||||
break;
|
||||
}
|
||||
if (pWav->msadpcm.cachedFrameCount == 0) {
|
||||
if (pWav->msadpcm.bytesRemainingInBlock == 0) {
|
||||
@@ -51073,7 +51073,8 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uin
|
||||
};
|
||||
DRWAV_ASSERT(pWav != NULL);
|
||||
DRWAV_ASSERT(framesToRead > 0);
|
||||
while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) {
|
||||
DRWAV_ASSERT(framesToRead > 0);
|
||||
if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) {
|
||||
if (pWav->channels == 1) {
|
||||
drwav_uint8 header[4];
|
||||
@@ -51124,7 +51125,7 @@ DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uin
|
||||
pWav->ima.cachedFrameCount -= 1;
|
||||
}
|
||||
if (framesToRead == 0) {
|
||||
return totalFramesRead;
|
||||
break;
|
||||
}
|
||||
if (pWav->ima.cachedFrameCount == 0) {
|
||||
if (pWav->ima.bytesRemainingInBlock == 0) {
|
||||
@@ -55382,7 +55383,8 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u
|
||||
DRFLAC_ASSERT(blockSize > 0);
|
||||
if (blockSize == 1) {
|
||||
header->blockSizeInPCMFrames = 192;
|
||||
} else if (blockSize >= 2 && blockSize <= 5) {
|
||||
} else if (blockSize <= 5) {
|
||||
DRFLAC_ASSERT(blockSize >= 2);
|
||||
header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2));
|
||||
} else if (blockSize == 6) {
|
||||
if (!drflac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) {
|
||||
@@ -57801,7 +57803,7 @@ static drflac_result drflac_result_from_errno(int e)
|
||||
}
|
||||
static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
if (ppFile != NULL) {
|
||||
@@ -57810,7 +57812,7 @@ static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const ch
|
||||
if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {
|
||||
return DRFLAC_INVALID_ARGS;
|
||||
}
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drflac_result_from_errno(err);
|
||||
@@ -63111,7 +63113,7 @@ static drmp3_result drmp3_result_from_errno(int e)
|
||||
}
|
||||
static drmp3_result drmp3_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)
|
||||
{
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
errno_t err;
|
||||
#endif
|
||||
if (ppFile != NULL) {
|
||||
@@ -63120,7 +63122,7 @@ static drmp3_result drmp3_fopen(FILE** ppFile, const char* pFilePath, const char
|
||||
if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {
|
||||
return DRMP3_INVALID_ARGS;
|
||||
}
|
||||
#if _MSC_VER && _MSC_VER >= 1400
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
err = fopen_s(ppFile, pFilePath, pOpenMode);
|
||||
if (err != 0) {
|
||||
return drmp3_result_from_errno(err);
|
||||
|
||||
Reference in New Issue
Block a user