Compare commits

..

4 Commits

Author SHA1 Message Date
eec7e405c8 Regen to remove size_t 2023-11-21 15:08:07 -05:00
9030c4da4a Add a note on static linking 2023-11-21 14:35:20 -05:00
66290530a3 Simplify 2023-09-18 20:53:15 -04:00
7a1463202a Rebuild using jai 0.1.072 2023-08-10 10:55:59 -04:00
4 changed files with 101 additions and 91 deletions

View File

@@ -1,3 +1,9 @@
// Jon said: "Static linking for runtime is actually the default (even if there is a dll). no_dll means you can't call it at compile-time because a dll is necessary for the compiler to load."
// The lib that is created with the DLL is
// just a stub lib. If you want static linking without any need for a DLL then
// build an actual static lib and use #library,no_static_library
// @incomplete I'm probably doing something wrong below, so review the above and play around with it.
LIBS_TO_BUILD: Libs : .WAV | .FLAC | .MP3; // @consider making this a metaprogram/command line arg. Can then use this as a git submodule in a project and a script/build file can generate bindings for what the project requires. LIBS_TO_BUILD: Libs : .WAV | .FLAC | .MP3; // @consider making this a metaprogram/command line arg. Can then use this as a git submodule in a project and a script/build file can generate bindings for what the project requires.
Libs :: enum_flags { Libs :: enum_flags {
@@ -11,10 +17,7 @@ AT_COMPILE_TIME :: true;
COMPILE :: true; // Enable to compile the dr_libs library from source before generating bindings. COMPILE :: true; // Enable to compile the dr_libs library from source before generating bindings.
COMPILE_DEBUG :: false; // Compile a debug or release version of dr_libs COMPILE_DEBUG :: false; // Compile a debug or release version of dr_libs
MAKE_STATIC_LIB :: true; MAKE_DYNAMIC_LIB :: false; // Will make a static lib when false.
MAKE_DYNAMIC_LIB :: false;
#assert (MAKE_STATIC_LIB || MAKE_DYNAMIC_LIB) && !(MAKE_STATIC_LIB && MAKE_DYNAMIC_LIB);
SOURCE_PATH :: "source"; SOURCE_PATH :: "source";
@@ -116,6 +119,15 @@ generate_bindings :: () -> bool {
array_add(*extra_clang_arguments, "-x", "c++", "-DWIN32_LEAN_AND_MEAN"); array_add(*extra_clang_arguments, "-x", "c++", "-DWIN32_LEAN_AND_MEAN");
#if MAKE_DYNAMIC_LIB {
libs := type_info(Libs);
for libs.names {
if LIBS_TO_BUILD & (xx libs.values[it_index]) {
array_add(*extra_clang_arguments, tprint("/DDR%_DLL", it));
}
}
}
log_stripped_declarations = false; // Set to true if things aren't working... log_stripped_declarations = false; // Set to true if things aren't working...
generate_compile_time_struct_checks = true; generate_compile_time_struct_checks = true;
} }

View File

@@ -1,7 +1,5 @@
#scope_module #scope_module
size_t :: u64;
#import "Basic"; #import "Basic";
#if OS == .WINDOWS { #if OS == .WINDOWS {

View File

@@ -209,8 +209,8 @@ drwav_version_string :: () -> *u8 #foreign dr_libs;
/* Allocation Callbacks */ /* Allocation Callbacks */
drwav_allocation_callbacks :: struct { drwav_allocation_callbacks :: struct {
pUserData: *void; pUserData: *void;
onMalloc: #type (sz: size_t, pUserData: *void) -> *void #c_call; onMalloc: #type (sz: u64, pUserData: *void) -> *void #c_call;
onRealloc: #type (p: *void, sz: size_t, pUserData: *void) -> *void #c_call; onRealloc: #type (p: *void, sz: u64, pUserData: *void) -> *void #c_call;
onFree: #type (p: *void, pUserData: *void) -> void #c_call; onFree: #type (p: *void, pUserData: *void) -> void #c_call;
} }
@@ -306,7 +306,7 @@ Returns the number of bytes actually read.
A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until
either the entire bytesToRead is filled or you have reached the end of the stream. either the entire bytesToRead is filled or you have reached the end of the stream.
*/ */
drwav_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: size_t) -> size_t #c_call; drwav_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: u64) -> u64 #c_call;
/* /*
Callback for when data is written. Returns value is the number of bytes actually written. Callback for when data is written. Returns value is the number of bytes actually written.
@@ -319,7 +319,7 @@ Returns the number of bytes actually written.
If the return value differs from bytesToWrite, it indicates an error. If the return value differs from bytesToWrite, it indicates an error.
*/ */
drwav_write_proc :: #type (pUserData: *void, pData: *void, bytesToWrite: size_t) -> size_t #c_call; drwav_write_proc :: #type (pUserData: *void, pData: *void, bytesToWrite: u64) -> u64 #c_call;
/* /*
Callback for when data needs to be seeked. Callback for when data needs to be seeked.
@@ -364,17 +364,17 @@ drwav_chunk_proc :: #type (pChunkUserData: *void, onRead: drwav_read_proc, onSee
/* Structure for internal use. Only used for loaders opened with drwav_init_memory(). */ /* Structure for internal use. Only used for loaders opened with drwav_init_memory(). */
drwav__memory_stream :: struct { drwav__memory_stream :: struct {
data: *drwav_uint8; data: *drwav_uint8;
dataSize: size_t; dataSize: u64;
currentReadPos: size_t; currentReadPos: u64;
} }
/* Structure for internal use. Only used for writers opened with drwav_init_memory_write(). */ /* Structure for internal use. Only used for writers opened with drwav_init_memory_write(). */
drwav__memory_stream_write :: struct { drwav__memory_stream_write :: struct {
ppData: **void; ppData: **void;
pDataSize: *size_t; pDataSize: *u64;
dataSize: size_t; dataSize: u64;
dataCapacity: size_t; dataCapacity: u64;
currentWritePos: size_t; currentWritePos: u64;
} }
drwav_data_format :: struct { drwav_data_format :: struct {
@@ -932,7 +932,7 @@ pBufferOut can be NULL in which case a seek will be performed.
Returns the number of bytes actually read. Returns the number of bytes actually read.
*/ */
drwav_read_raw :: (pWav: *drwav, bytesToRead: size_t, pBufferOut: *void) -> size_t #foreign dr_libs; drwav_read_raw :: (pWav: *drwav, bytesToRead: u64, pBufferOut: *void) -> u64 #foreign dr_libs;
/* /*
Reads up to the specified number of PCM frames from the WAV file. Reads up to the specified number of PCM frames from the WAV file.
@@ -974,7 +974,7 @@ Writes raw audio data.
Returns the number of bytes actually written. If this differs from bytesToWrite, it indicates an error. Returns the number of bytes actually written. If this differs from bytesToWrite, it indicates an error.
*/ */
drwav_write_raw :: (pWav: *drwav, bytesToWrite: size_t, pData: *void) -> size_t #foreign dr_libs; drwav_write_raw :: (pWav: *drwav, bytesToWrite: u64, pData: *void) -> u64 #foreign dr_libs;
/* /*
Writes PCM frames. Writes PCM frames.
@@ -1002,25 +1002,25 @@ drwav_read_pcm_frames_s16le :: (pWav: *drwav, framesToRead: drwav_uint64, pBuffe
drwav_read_pcm_frames_s16be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *drwav_int16) -> drwav_uint64 #foreign dr_libs; drwav_read_pcm_frames_s16be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *drwav_int16) -> drwav_uint64 #foreign dr_libs;
/* Low-level function for converting unsigned 8-bit PCM samples to signed 16-bit PCM samples. */ /* Low-level function for converting unsigned 8-bit PCM samples to signed 16-bit PCM samples. */
drwav_u8_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_u8_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 24-bit PCM samples to signed 16-bit PCM samples. */ /* Low-level function for converting signed 24-bit PCM samples to signed 16-bit PCM samples. */
drwav_s24_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_s24_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 32-bit PCM samples to signed 16-bit PCM samples. */ /* Low-level function for converting signed 32-bit PCM samples to signed 16-bit PCM samples. */
drwav_s32_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_int32, sampleCount: size_t) -> void #foreign dr_libs; drwav_s32_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_int32, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting IEEE 32-bit floating point samples to signed 16-bit PCM samples. */ /* Low-level function for converting IEEE 32-bit floating point samples to signed 16-bit PCM samples. */
drwav_f32_to_s16 :: (pOut: *drwav_int16, pIn: *float, sampleCount: size_t) -> void #foreign dr_libs; drwav_f32_to_s16 :: (pOut: *drwav_int16, pIn: *float, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting IEEE 64-bit floating point samples to signed 16-bit PCM samples. */ /* Low-level function for converting IEEE 64-bit floating point samples to signed 16-bit PCM samples. */
drwav_f64_to_s16 :: (pOut: *drwav_int16, pIn: *float64, sampleCount: size_t) -> void #foreign dr_libs; drwav_f64_to_s16 :: (pOut: *drwav_int16, pIn: *float64, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting A-law samples to signed 16-bit PCM samples. */ /* Low-level function for converting A-law samples to signed 16-bit PCM samples. */
drwav_alaw_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_alaw_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting u-law samples to signed 16-bit PCM samples. */ /* Low-level function for converting u-law samples to signed 16-bit PCM samples. */
drwav_mulaw_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_mulaw_to_s16 :: (pOut: *drwav_int16, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* /*
Reads a chunk of audio data and converts it to IEEE 32-bit floating point samples. Reads a chunk of audio data and converts it to IEEE 32-bit floating point samples.
@@ -1036,25 +1036,25 @@ drwav_read_pcm_frames_f32le :: (pWav: *drwav, framesToRead: drwav_uint64, pBuffe
drwav_read_pcm_frames_f32be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *float) -> drwav_uint64 #foreign dr_libs; drwav_read_pcm_frames_f32be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *float) -> drwav_uint64 #foreign dr_libs;
/* Low-level function for converting unsigned 8-bit PCM samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting unsigned 8-bit PCM samples to IEEE 32-bit floating point samples. */
drwav_u8_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_u8_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 16-bit PCM samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting signed 16-bit PCM samples to IEEE 32-bit floating point samples. */
drwav_s16_to_f32 :: (pOut: *float, pIn: *drwav_int16, sampleCount: size_t) -> void #foreign dr_libs; drwav_s16_to_f32 :: (pOut: *float, pIn: *drwav_int16, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 24-bit PCM samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting signed 24-bit PCM samples to IEEE 32-bit floating point samples. */
drwav_s24_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_s24_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 32-bit PCM samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting signed 32-bit PCM samples to IEEE 32-bit floating point samples. */
drwav_s32_to_f32 :: (pOut: *float, pIn: *drwav_int32, sampleCount: size_t) -> void #foreign dr_libs; drwav_s32_to_f32 :: (pOut: *float, pIn: *drwav_int32, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting IEEE 64-bit floating point samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting IEEE 64-bit floating point samples to IEEE 32-bit floating point samples. */
drwav_f64_to_f32 :: (pOut: *float, pIn: *float64, sampleCount: size_t) -> void #foreign dr_libs; drwav_f64_to_f32 :: (pOut: *float, pIn: *float64, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting A-law samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting A-law samples to IEEE 32-bit floating point samples. */
drwav_alaw_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_alaw_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting u-law samples to IEEE 32-bit floating point samples. */ /* Low-level function for converting u-law samples to IEEE 32-bit floating point samples. */
drwav_mulaw_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_mulaw_to_f32 :: (pOut: *float, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* /*
Reads a chunk of audio data and converts it to signed 32-bit PCM samples. Reads a chunk of audio data and converts it to signed 32-bit PCM samples.
@@ -1070,25 +1070,25 @@ drwav_read_pcm_frames_s32le :: (pWav: *drwav, framesToRead: drwav_uint64, pBuffe
drwav_read_pcm_frames_s32be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *drwav_int32) -> drwav_uint64 #foreign dr_libs; drwav_read_pcm_frames_s32be :: (pWav: *drwav, framesToRead: drwav_uint64, pBufferOut: *drwav_int32) -> drwav_uint64 #foreign dr_libs;
/* Low-level function for converting unsigned 8-bit PCM samples to signed 32-bit PCM samples. */ /* Low-level function for converting unsigned 8-bit PCM samples to signed 32-bit PCM samples. */
drwav_u8_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_u8_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 16-bit PCM samples to signed 32-bit PCM samples. */ /* Low-level function for converting signed 16-bit PCM samples to signed 32-bit PCM samples. */
drwav_s16_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_int16, sampleCount: size_t) -> void #foreign dr_libs; drwav_s16_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_int16, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting signed 24-bit PCM samples to signed 32-bit PCM samples. */ /* Low-level function for converting signed 24-bit PCM samples to signed 32-bit PCM samples. */
drwav_s24_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_s24_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting IEEE 32-bit floating point samples to signed 32-bit PCM samples. */ /* Low-level function for converting IEEE 32-bit floating point samples to signed 32-bit PCM samples. */
drwav_f32_to_s32 :: (pOut: *drwav_int32, pIn: *float, sampleCount: size_t) -> void #foreign dr_libs; drwav_f32_to_s32 :: (pOut: *drwav_int32, pIn: *float, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting IEEE 64-bit floating point samples to signed 32-bit PCM samples. */ /* Low-level function for converting IEEE 64-bit floating point samples to signed 32-bit PCM samples. */
drwav_f64_to_s32 :: (pOut: *drwav_int32, pIn: *float64, sampleCount: size_t) -> void #foreign dr_libs; drwav_f64_to_s32 :: (pOut: *drwav_int32, pIn: *float64, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting A-law samples to signed 32-bit PCM samples. */ /* Low-level function for converting A-law samples to signed 32-bit PCM samples. */
drwav_alaw_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_alaw_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* Low-level function for converting u-law samples to signed 32-bit PCM samples. */ /* Low-level function for converting u-law samples to signed 32-bit PCM samples. */
drwav_mulaw_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: size_t) -> void #foreign dr_libs; drwav_mulaw_to_s32 :: (pOut: *drwav_int32, pIn: *drwav_uint8, sampleCount: u64) -> void #foreign dr_libs;
/* /*
Helper for initializing a wave file for reading using stdio. Helper for initializing a wave file for reading using stdio.
@@ -1126,9 +1126,9 @@ the lifetime of the drwav object.
The buffer should contain the contents of the entire wave file, not just the sample data. The buffer should contain the contents of the entire wave file, not just the sample data.
*/ */
drwav_init_memory :: (pWav: *drwav, data: *void, dataSize: size_t, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory :: (pWav: *drwav, data: *void, dataSize: u64, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
drwav_init_memory_ex :: (pWav: *drwav, data: *void, dataSize: size_t, onChunk: drwav_chunk_proc, pChunkUserData: *void, flags: drwav_uint32, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory_ex :: (pWav: *drwav, data: *void, dataSize: u64, onChunk: drwav_chunk_proc, pChunkUserData: *void, flags: drwav_uint32, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
drwav_init_memory_with_metadata :: (pWav: *drwav, data: *void, dataSize: size_t, flags: drwav_uint32, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory_with_metadata :: (pWav: *drwav, data: *void, dataSize: u64, flags: drwav_uint32, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
/* /*
Helper for initializing a writer which outputs data to a memory buffer. Helper for initializing a writer which outputs data to a memory buffer.
@@ -1138,9 +1138,9 @@ dr_wav will manage the memory allocations, however it is up to the caller to fre
The buffer will remain allocated even after drwav_uninit() is called. The buffer should not be considered valid The buffer will remain allocated even after drwav_uninit() is called. The buffer should not be considered valid
until after drwav_uninit() has been called. until after drwav_uninit() has been called.
*/ */
drwav_init_memory_write :: (pWav: *drwav, ppData: **void, pDataSize: *size_t, pFormat: *drwav_data_format, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory_write :: (pWav: *drwav, ppData: **void, pDataSize: *u64, pFormat: *drwav_data_format, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
drwav_init_memory_write_sequential :: (pWav: *drwav, ppData: **void, pDataSize: *size_t, pFormat: *drwav_data_format, totalSampleCount: drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory_write_sequential :: (pWav: *drwav, ppData: **void, pDataSize: *u64, pFormat: *drwav_data_format, totalSampleCount: drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
drwav_init_memory_write_sequential_pcm_frames :: (pWav: *drwav, ppData: **void, pDataSize: *size_t, pFormat: *drwav_data_format, totalPCMFrameCount: drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs; drwav_init_memory_write_sequential_pcm_frames :: (pWav: *drwav, ppData: **void, pDataSize: *u64, pFormat: *drwav_data_format, totalPCMFrameCount: drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> drwav_bool32 #foreign dr_libs;
/* /*
Opens and reads an entire wav file in a single operation. Opens and reads an entire wav file in a single operation.
@@ -1168,9 +1168,9 @@ Opens and decodes an entire wav file from a block of memory in a single operatio
The return value is a heap-allocated buffer containing the audio data. Use drwav_free() to free the buffer. The return value is a heap-allocated buffer containing the audio data. Use drwav_free() to free the buffer.
*/ */
drwav_open_memory_and_read_pcm_frames_s16 :: (data: *void, dataSize: size_t, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *drwav_int16 #foreign dr_libs; drwav_open_memory_and_read_pcm_frames_s16 :: (data: *void, dataSize: u64, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *drwav_int16 #foreign dr_libs;
drwav_open_memory_and_read_pcm_frames_f32 :: (data: *void, dataSize: size_t, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *float #foreign dr_libs; drwav_open_memory_and_read_pcm_frames_f32 :: (data: *void, dataSize: u64, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *float #foreign dr_libs;
drwav_open_memory_and_read_pcm_frames_s32 :: (data: *void, dataSize: size_t, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *drwav_int32 #foreign dr_libs; drwav_open_memory_and_read_pcm_frames_s32 :: (data: *void, dataSize: u64, channelsOut: *u32, sampleRateOut: *u32, totalFrameCountOut: *drwav_uint64, pAllocationCallbacks: *drwav_allocation_callbacks) -> *drwav_int32 #foreign dr_libs;
/* Frees data that was allocated internally by dr_wav. */ /* Frees data that was allocated internally by dr_wav. */
drwav_free :: (p: *void, pAllocationCallbacks: *drwav_allocation_callbacks) -> void #foreign dr_libs; drwav_free :: (p: *void, pAllocationCallbacks: *drwav_allocation_callbacks) -> void #foreign dr_libs;
@@ -1212,8 +1212,8 @@ drflac_version_string :: () -> *u8 #foreign dr_libs;
/* Allocation Callbacks */ /* Allocation Callbacks */
drflac_allocation_callbacks :: struct { drflac_allocation_callbacks :: struct {
pUserData: *void; pUserData: *void;
onMalloc: #type (sz: size_t, pUserData: *void) -> *void #c_call; onMalloc: #type (sz: u64, pUserData: *void) -> *void #c_call;
onRealloc: #type (p: *void, sz: size_t, pUserData: *void) -> *void #c_call; onRealloc: #type (p: *void, sz: u64, pUserData: *void) -> *void #c_call;
onFree: #type (p: *void, pUserData: *void) -> void #c_call; onFree: #type (p: *void, pUserData: *void) -> void #c_call;
} }
@@ -1348,7 +1348,7 @@ Remarks
A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until either the entire bytesToRead is filled or A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until either the entire bytesToRead is filled or
you have reached the end of the stream. you have reached the end of the stream.
*/ */
drflac_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: size_t) -> size_t #c_call; drflac_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: u64) -> u64 #c_call;
/* /*
Callback for when data needs to be seeked. Callback for when data needs to be seeked.
@@ -1404,8 +1404,8 @@ drflac_meta_proc :: #type (pUserData: *void, pMetadata: *drflac_metadata) -> voi
/* Structure for internal use. Only used for decoders opened with drflac_open_memory. */ /* Structure for internal use. Only used for decoders opened with drflac_open_memory. */
drflac__memory_stream :: struct { drflac__memory_stream :: struct {
data: *drflac_uint8; data: *drflac_uint8;
dataSize: size_t; dataSize: u64;
currentReadPos: size_t; currentReadPos: u64;
} }
/* Structure for internal use. Used for bit streaming. */ /* Structure for internal use. Used for bit streaming. */
@@ -1424,7 +1424,7 @@ drflac_bs :: struct {
stream there will be a number of bytes that don't cleanly fit in an L1 cache line, so we use this variable to know whether stream there will be a number of bytes that don't cleanly fit in an L1 cache line, so we use this variable to know whether
or not the bistreamer needs to run on a slower path to read those last bytes. This will never be more than sizeof(drflac_cache_t). or not the bistreamer needs to run on a slower path to read those last bytes. This will never be more than sizeof(drflac_cache_t).
*/ */
unalignedByteCount: size_t; unalignedByteCount: u64;
/* The content of the unaligned bytes. */ /* The content of the unaligned bytes. */
unalignedCache: drflac_cache_t; unalignedCache: drflac_cache_t;
@@ -1570,9 +1570,9 @@ drflac :: struct {
_oggbs: *void; _oggbs: *void;
/* Internal use only. Used for profiling and testing different seeking modes. */ /* Internal use only. Used for profiling and testing different seeking modes. */
_noSeekTableSeek: drflac_bool32; _noSeekTableSeek: u8;
#place _noSeekTableSeek; /*bitfield 1*/ _noBinarySearchSeek: drflac_bool32; #place _noSeekTableSeek; /*bitfield 1*/ _noBinarySearchSeek: u8;
#place _noSeekTableSeek; /*bitfield 2*/ _noBruteForceSeek: drflac_bool32; #place _noSeekTableSeek; /*bitfield 2*/ _noBruteForceSeek: u8;
/* The bit streamer. The raw FLAC data is fed through this object. */ /* The bit streamer. The raw FLAC data is fed through this object. */
bs: drflac_bs; bs: drflac_bs;
@@ -1976,7 +1976,7 @@ See Also
drflac_open() drflac_open()
drflac_close() drflac_close()
*/ */
drflac_open_memory :: (pData: *void, dataSize: size_t, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac #foreign dr_libs; drflac_open_memory :: (pData: *void, dataSize: u64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac #foreign dr_libs;
/* /*
Opens a FLAC decoder from a pre-allocated block of memory and notifies the caller of the metadata chunks (album art, etc.) Opens a FLAC decoder from a pre-allocated block of memory and notifies the caller of the metadata chunks (album art, etc.)
@@ -2011,7 +2011,7 @@ drflac_open_with_metadata()
drflac_open() drflac_open()
drflac_close() drflac_close()
*/ */
drflac_open_memory_with_metadata :: (pData: *void, dataSize: size_t, onMeta: drflac_meta_proc, pUserData: *void, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac #foreign dr_libs; drflac_open_memory_with_metadata :: (pData: *void, dataSize: u64, onMeta: drflac_meta_proc, pUserData: *void, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac #foreign dr_libs;
/* /*
Opens a FLAC stream from the given callbacks and fully decodes it in a single operation. The return value is a Opens a FLAC stream from the given callbacks and fully decodes it in a single operation. The return value is a
@@ -2043,13 +2043,13 @@ drflac_open_file_and_read_pcm_frames_s16 :: (filename: *u8, channels: *u32, samp
drflac_open_file_and_read_pcm_frames_f32 :: (filename: *u8, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *float #foreign dr_libs; drflac_open_file_and_read_pcm_frames_f32 :: (filename: *u8, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *float #foreign dr_libs;
/* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a block of memory. */ /* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a block of memory. */
drflac_open_memory_and_read_pcm_frames_s32 :: (data: *void, dataSize: size_t, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac_int32 #foreign dr_libs; drflac_open_memory_and_read_pcm_frames_s32 :: (data: *void, dataSize: u64, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac_int32 #foreign dr_libs;
/* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */ /* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */
drflac_open_memory_and_read_pcm_frames_s16 :: (data: *void, dataSize: size_t, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac_int16 #foreign dr_libs; drflac_open_memory_and_read_pcm_frames_s16 :: (data: *void, dataSize: u64, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *drflac_int16 #foreign dr_libs;
/* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */ /* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */
drflac_open_memory_and_read_pcm_frames_f32 :: (data: *void, dataSize: size_t, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *float #foreign dr_libs; drflac_open_memory_and_read_pcm_frames_f32 :: (data: *void, dataSize: u64, channels: *u32, sampleRate: *u32, totalPCMFrameCount: *drflac_uint64, pAllocationCallbacks: *drflac_allocation_callbacks) -> *float #foreign dr_libs;
/* /*
Frees memory that was allocated internally by dr_flac. Frees memory that was allocated internally by dr_flac.
@@ -2134,8 +2134,8 @@ drmp3_version_string :: () -> *u8 #foreign dr_libs;
/* Allocation Callbacks */ /* Allocation Callbacks */
drmp3_allocation_callbacks :: struct { drmp3_allocation_callbacks :: struct {
pUserData: *void; pUserData: *void;
onMalloc: #type (sz: size_t, pUserData: *void) -> *void #c_call; onMalloc: #type (sz: u64, pUserData: *void) -> *void #c_call;
onRealloc: #type (p: *void, sz: size_t, pUserData: *void) -> *void #c_call; onRealloc: #type (p: *void, sz: u64, pUserData: *void) -> *void #c_call;
onFree: #type (p: *void, pUserData: *void) -> void #c_call; onFree: #type (p: *void, pUserData: *void) -> void #c_call;
} }
@@ -2167,7 +2167,7 @@ drmp3dec_init :: (dec: *drmp3dec) -> void #foreign dr_libs;
drmp3dec_decode_frame :: (dec: *drmp3dec, mp3: *drmp3_uint8, mp3_bytes: s32, pcm: *void, info: *drmp3dec_frame_info) -> s32 #foreign dr_libs; drmp3dec_decode_frame :: (dec: *drmp3dec, mp3: *drmp3_uint8, mp3_bytes: s32, pcm: *void, info: *drmp3dec_frame_info) -> s32 #foreign dr_libs;
/* Helper for converting between f32 and s16. */ /* Helper for converting between f32 and s16. */
drmp3dec_f32_to_s16 :: (in: *float, out: *drmp3_int16, num_samples: size_t) -> void #foreign dr_libs; drmp3dec_f32_to_s16 :: (in: *float, out: *drmp3_int16, num_samples: u64) -> void #foreign dr_libs;
/* /*
Main API (Pull API) Main API (Pull API)
@@ -2200,7 +2200,7 @@ Returns the number of bytes actually read.
A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until
either the entire bytesToRead is filled or you have reached the end of the stream. either the entire bytesToRead is filled or you have reached the end of the stream.
*/ */
drmp3_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: size_t) -> size_t #c_call; drmp3_read_proc :: #type (pUserData: *void, pBufferOut: *void, bytesToRead: u64) -> u64 #c_call;
/* /*
Callback for when data needs to be seeked. Callback for when data needs to be seeked.
@@ -2238,15 +2238,15 @@ drmp3 :: struct {
streamCursor: drmp3_uint64; /* The current byte the decoder is sitting on in the raw stream. */ streamCursor: drmp3_uint64; /* The current byte the decoder is sitting on in the raw stream. */
pSeekPoints: *drmp3_seek_point; /* NULL by default. Set with drmp3_bind_seek_table(). Memory is owned by the client. dr_mp3 will never attempt to free this pointer. */ pSeekPoints: *drmp3_seek_point; /* NULL by default. Set with drmp3_bind_seek_table(). Memory is owned by the client. dr_mp3 will never attempt to free this pointer. */
seekPointCount: drmp3_uint32; /* The number of items in pSeekPoints. When set to 0 assumes to no seek table. Defaults to zero. */ seekPointCount: drmp3_uint32; /* The number of items in pSeekPoints. When set to 0 assumes to no seek table. Defaults to zero. */
dataSize: size_t; dataSize: u64;
dataCapacity: size_t; dataCapacity: u64;
dataConsumed: size_t; dataConsumed: u64;
pData: *drmp3_uint8; pData: *drmp3_uint8;
atEnd: drmp3_bool32; atEnd: u8;
memory: struct { memory: struct {
pData: *drmp3_uint8; pData: *drmp3_uint8;
dataSize: size_t; dataSize: u64;
currentReadPos: size_t; currentReadPos: u64;
}; /* Only used for decoders that were opened against a block of memory. */ }; /* Only used for decoders that were opened against a block of memory. */
} }
@@ -2273,7 +2273,7 @@ the lifetime of the drmp3 object.
The buffer should contain the contents of the entire MP3 file. The buffer should contain the contents of the entire MP3 file.
*/ */
drmp3_init_memory :: (pMP3: *drmp3, pData: *void, dataSize: size_t, pAllocationCallbacks: *drmp3_allocation_callbacks) -> drmp3_bool32 #foreign dr_libs; drmp3_init_memory :: (pMP3: *drmp3, pData: *void, dataSize: u64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> drmp3_bool32 #foreign dr_libs;
/* /*
Initializes an MP3 decoder from a file. Initializes an MP3 decoder from a file.
@@ -2362,8 +2362,8 @@ Free the returned pointer with drmp3_free().
drmp3_open_and_read_pcm_frames_f32 :: (onRead: drmp3_read_proc, onSeek: drmp3_seek_proc, pUserData: *void, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs; drmp3_open_and_read_pcm_frames_f32 :: (onRead: drmp3_read_proc, onSeek: drmp3_seek_proc, pUserData: *void, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs;
drmp3_open_and_read_pcm_frames_s16 :: (onRead: drmp3_read_proc, onSeek: drmp3_seek_proc, pUserData: *void, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs; drmp3_open_and_read_pcm_frames_s16 :: (onRead: drmp3_read_proc, onSeek: drmp3_seek_proc, pUserData: *void, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs;
drmp3_open_memory_and_read_pcm_frames_f32 :: (pData: *void, dataSize: size_t, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs; drmp3_open_memory_and_read_pcm_frames_f32 :: (pData: *void, dataSize: u64, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs;
drmp3_open_memory_and_read_pcm_frames_s16 :: (pData: *void, dataSize: size_t, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs; drmp3_open_memory_and_read_pcm_frames_s16 :: (pData: *void, dataSize: u64, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs;
drmp3_open_file_and_read_pcm_frames_f32 :: (filePath: *u8, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs; drmp3_open_file_and_read_pcm_frames_f32 :: (filePath: *u8, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *float #foreign dr_libs;
drmp3_open_file_and_read_pcm_frames_s16 :: (filePath: *u8, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs; drmp3_open_file_and_read_pcm_frames_s16 :: (filePath: *u8, pConfig: *drmp3_config, pTotalFrameCount: *drmp3_uint64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *drmp3_int16 #foreign dr_libs;
@@ -2371,7 +2371,7 @@ drmp3_open_file_and_read_pcm_frames_s16 :: (filePath: *u8, pConfig: *drmp3_confi
/* /*
Allocates a block of memory on the heap. Allocates a block of memory on the heap.
*/ */
drmp3_malloc :: (sz: size_t, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *void #foreign dr_libs; drmp3_malloc :: (sz: u64, pAllocationCallbacks: *drmp3_allocation_callbacks) -> *void #foreign dr_libs;
/* /*
Frees any memory that was allocated by a public drmp3 API. Frees any memory that was allocated by a public drmp3 API.
@@ -2921,13 +2921,13 @@ dr_libs :: #library,no_dll "windows/dr_libs";
assert(size_of(type_of(drflac._oggbs)) == 8, "drflac._oggbs has unexpected size % instead of 8", size_of(type_of(drflac._oggbs))); assert(size_of(type_of(drflac._oggbs)) == 8, "drflac._oggbs has unexpected size % instead of 8", size_of(type_of(drflac._oggbs)));
// Bitfields are currently not correctly aligned // Bitfields are currently not correctly aligned
// assert(((cast(*void)(*instance._noSeekTableSeek)) - cast(*void)(*instance)) == 296, "drflac._noSeekTableSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noSeekTableSeek)) - cast(*void)(*instance))); // assert(((cast(*void)(*instance._noSeekTableSeek)) - cast(*void)(*instance)) == 296, "drflac._noSeekTableSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noSeekTableSeek)) - cast(*void)(*instance)));
assert(size_of(type_of(drflac._noSeekTableSeek)) == 4, "drflac._noSeekTableSeek has unexpected size % instead of 4", size_of(type_of(drflac._noSeekTableSeek))); assert(size_of(type_of(drflac._noSeekTableSeek)) == 1, "drflac._noSeekTableSeek has unexpected size % instead of 1", size_of(type_of(drflac._noSeekTableSeek)));
// Bitfields are currently not correctly aligned // Bitfields are currently not correctly aligned
// assert(((cast(*void)(*instance._noBinarySearchSeek)) - cast(*void)(*instance)) == 296, "drflac._noBinarySearchSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noBinarySearchSeek)) - cast(*void)(*instance))); // assert(((cast(*void)(*instance._noBinarySearchSeek)) - cast(*void)(*instance)) == 296, "drflac._noBinarySearchSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noBinarySearchSeek)) - cast(*void)(*instance)));
assert(size_of(type_of(drflac._noBinarySearchSeek)) == 4, "drflac._noBinarySearchSeek has unexpected size % instead of 4", size_of(type_of(drflac._noBinarySearchSeek))); assert(size_of(type_of(drflac._noBinarySearchSeek)) == 1, "drflac._noBinarySearchSeek has unexpected size % instead of 1", size_of(type_of(drflac._noBinarySearchSeek)));
// Bitfields are currently not correctly aligned // Bitfields are currently not correctly aligned
// assert(((cast(*void)(*instance._noBruteForceSeek)) - cast(*void)(*instance)) == 296, "drflac._noBruteForceSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noBruteForceSeek)) - cast(*void)(*instance))); // assert(((cast(*void)(*instance._noBruteForceSeek)) - cast(*void)(*instance)) == 296, "drflac._noBruteForceSeek has unexpected offset % instead of 296", ((cast(*void)(*instance._noBruteForceSeek)) - cast(*void)(*instance)));
assert(size_of(type_of(drflac._noBruteForceSeek)) == 4, "drflac._noBruteForceSeek has unexpected size % instead of 4", size_of(type_of(drflac._noBruteForceSeek))); assert(size_of(type_of(drflac._noBruteForceSeek)) == 1, "drflac._noBruteForceSeek has unexpected size % instead of 1", size_of(type_of(drflac._noBruteForceSeek)));
assert(((cast(*void)(*instance.bs)) - cast(*void)(*instance)) == 304, "drflac.bs has unexpected offset % instead of 304", ((cast(*void)(*instance.bs)) - cast(*void)(*instance))); assert(((cast(*void)(*instance.bs)) - cast(*void)(*instance)) == 304, "drflac.bs has unexpected offset % instead of 304", ((cast(*void)(*instance.bs)) - cast(*void)(*instance)));
assert(size_of(type_of(drflac.bs)) == 4176, "drflac.bs has unexpected size % instead of 4176", size_of(type_of(drflac.bs))); assert(size_of(type_of(drflac.bs)) == 4176, "drflac.bs has unexpected size % instead of 4176", size_of(type_of(drflac.bs)));
assert(((cast(*void)(*instance.pExtraData)) - cast(*void)(*instance)) == 4480, "drflac.pExtraData has unexpected offset % instead of 4480", ((cast(*void)(*instance.pExtraData)) - cast(*void)(*instance))); assert(((cast(*void)(*instance.pExtraData)) - cast(*void)(*instance)) == 4480, "drflac.pExtraData has unexpected offset % instead of 4480", ((cast(*void)(*instance.pExtraData)) - cast(*void)(*instance)));
@@ -3094,7 +3094,7 @@ dr_libs :: #library,no_dll "windows/dr_libs";
assert(size_of(type_of(drmp3.pData)) == 8, "drmp3.pData has unexpected size % instead of 8", size_of(type_of(drmp3.pData))); assert(size_of(type_of(drmp3.pData)) == 8, "drmp3.pData has unexpected size % instead of 8", size_of(type_of(drmp3.pData)));
// Bitfields are currently not correctly aligned // Bitfields are currently not correctly aligned
// assert(((cast(*void)(*instance.atEnd)) - cast(*void)(*instance)) == 16032, "drmp3.atEnd has unexpected offset % instead of 16032", ((cast(*void)(*instance.atEnd)) - cast(*void)(*instance))); // assert(((cast(*void)(*instance.atEnd)) - cast(*void)(*instance)) == 16032, "drmp3.atEnd has unexpected offset % instead of 16032", ((cast(*void)(*instance.atEnd)) - cast(*void)(*instance)));
assert(size_of(type_of(drmp3.atEnd)) == 4, "drmp3.atEnd has unexpected size % instead of 4", size_of(type_of(drmp3.atEnd))); assert(size_of(type_of(drmp3.atEnd)) == 1, "drmp3.atEnd has unexpected size % instead of 1", size_of(type_of(drmp3.atEnd)));
assert(((cast(*void)(*instance.memory)) - cast(*void)(*instance)) == 16040, "drmp3.memory has unexpected offset % instead of 16040", ((cast(*void)(*instance.memory)) - cast(*void)(*instance))); assert(((cast(*void)(*instance.memory)) - cast(*void)(*instance)) == 16040, "drmp3.memory has unexpected offset % instead of 16040", ((cast(*void)(*instance.memory)) - cast(*void)(*instance)));
assert(size_of(type_of(drmp3.memory)) == 24, "drmp3.memory has unexpected size % instead of 24", size_of(type_of(drmp3.memory))); assert(size_of(type_of(drmp3.memory)) == 24, "drmp3.memory has unexpected size % instead of 24", size_of(type_of(drmp3.memory)));
assert(size_of(drmp3) == 16064, "drmp3 has size % instead of 16064", size_of(drmp3)); assert(size_of(drmp3) == 16064, "drmp3 has size % instead of 16064", size_of(drmp3));

Binary file not shown.