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:
+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