Compare commits
2 Commits
5cc1fc31ff
...
66290530a3
Author | SHA1 | Date | |
---|---|---|---|
66290530a3 | |||
7a1463202a |
14
generate.jai
14
generate.jai
|
@ -11,10 +11,7 @@ AT_COMPILE_TIME :: true;
|
|||
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
|
||||
|
||||
MAKE_STATIC_LIB :: true;
|
||||
MAKE_DYNAMIC_LIB :: false;
|
||||
|
||||
#assert (MAKE_STATIC_LIB || MAKE_DYNAMIC_LIB) && !(MAKE_STATIC_LIB && MAKE_DYNAMIC_LIB);
|
||||
MAKE_DYNAMIC_LIB :: false; // Will make a static lib when false.
|
||||
|
||||
SOURCE_PATH :: "source";
|
||||
|
||||
|
@ -116,6 +113,15 @@ generate_bindings :: () -> bool {
|
|||
|
||||
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...
|
||||
generate_compile_time_struct_checks = true;
|
||||
}
|
||||
|
|
16
windows.jai
16
windows.jai
|
@ -1570,9 +1570,9 @@ drflac :: struct {
|
|||
_oggbs: *void;
|
||||
|
||||
/* Internal use only. Used for profiling and testing different seeking modes. */
|
||||
_noSeekTableSeek: drflac_bool32;
|
||||
#place _noSeekTableSeek; /*bitfield 1*/ _noBinarySearchSeek: drflac_bool32;
|
||||
#place _noSeekTableSeek; /*bitfield 2*/ _noBruteForceSeek: drflac_bool32;
|
||||
_noSeekTableSeek: u8;
|
||||
#place _noSeekTableSeek; /*bitfield 1*/ _noBinarySearchSeek: u8;
|
||||
#place _noSeekTableSeek; /*bitfield 2*/ _noBruteForceSeek: u8;
|
||||
|
||||
/* The bit streamer. The raw FLAC data is fed through this object. */
|
||||
bs: drflac_bs;
|
||||
|
@ -2242,7 +2242,7 @@ drmp3 :: struct {
|
|||
dataCapacity: size_t;
|
||||
dataConsumed: size_t;
|
||||
pData: *drmp3_uint8;
|
||||
atEnd: drmp3_bool32;
|
||||
atEnd: u8;
|
||||
memory: struct {
|
||||
pData: *drmp3_uint8;
|
||||
dataSize: size_t;
|
||||
|
@ -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)));
|
||||
// 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(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
|
||||
// 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
|
||||
// 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(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)));
|
||||
|
@ -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)));
|
||||
// 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(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(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));
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user