mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Update dr_wav and dr_mp3.
This commit is contained in:
+14
-11
@@ -82499,7 +82499,7 @@ MA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory_write(void* pUserData, int offset
|
|||||||
newCursor = (ma_int64)pWav->memoryStreamWrite.dataSize;
|
newCursor = (ma_int64)pWav->memoryStreamWrite.dataSize;
|
||||||
} else {
|
} else {
|
||||||
MA_DR_WAV_ASSERT(!"Invalid seek origin");
|
MA_DR_WAV_ASSERT(!"Invalid seek origin");
|
||||||
return MA_INVALID_ARGS;
|
return MA_FALSE;
|
||||||
}
|
}
|
||||||
newCursor += offset;
|
newCursor += offset;
|
||||||
if (newCursor < 0) {
|
if (newCursor < 0) {
|
||||||
@@ -94685,19 +94685,22 @@ static ma_bool32 ma_dr_mp3_init_internal(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc on
|
|||||||
((ma_uint32)ape[25] << 8) |
|
((ma_uint32)ape[25] << 8) |
|
||||||
((ma_uint32)ape[26] << 16) |
|
((ma_uint32)ape[26] << 16) |
|
||||||
((ma_uint32)ape[27] << 24);
|
((ma_uint32)ape[27] << 24);
|
||||||
streamEndOffset -= 32 + tagSize;
|
if (32 + tagSize < streamLen) {
|
||||||
streamLen -= 32 + tagSize;
|
streamEndOffset -= 32 + tagSize;
|
||||||
if (onMeta != NULL) {
|
streamLen -= 32 + tagSize;
|
||||||
if (onSeek(pUserData, streamEndOffset, MA_DR_MP3_SEEK_END)) {
|
if (onMeta != NULL) {
|
||||||
size_t apeTagSize = (size_t)tagSize + 32;
|
if (onSeek(pUserData, streamEndOffset, MA_DR_MP3_SEEK_END)) {
|
||||||
ma_uint8* pTagData = (ma_uint8*)ma_dr_mp3_malloc(apeTagSize, pAllocationCallbacks);
|
size_t apeTagSize = (size_t)tagSize + 32;
|
||||||
if (pTagData != NULL) {
|
ma_uint8* pTagData = (ma_uint8*)ma_dr_mp3_malloc(apeTagSize, pAllocationCallbacks);
|
||||||
if (onRead(pUserData, pTagData, apeTagSize) == apeTagSize) {
|
if (pTagData != NULL) {
|
||||||
ma_dr_mp3__on_meta(pMP3, MA_DR_MP3_METADATA_TYPE_APE, pTagData, apeTagSize);
|
if (onRead(pUserData, pTagData, apeTagSize) == apeTagSize) {
|
||||||
|
ma_dr_mp3__on_meta(pMP3, MA_DR_MP3_METADATA_TYPE_APE, pTagData, apeTagSize);
|
||||||
|
}
|
||||||
|
ma_dr_mp3_free(pTagData, pAllocationCallbacks);
|
||||||
}
|
}
|
||||||
ma_dr_mp3_free(pTagData, pAllocationCallbacks);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user