Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miniaudio file name hashing fix #568

Merged
merged 8 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/c/libqb/include/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#include <stdio.h>

#if defined(AUDIO_DEBUG) && AUDIO_DEBUG > 0
# define AUDIO_DEBUG_FILENAME (std::strrchr(__FILE__, '/') ? std::strrchr(__FILE__, '/') + 1 : __FILE__)
# define AUDIO_DEBUG_PRINT(_fmt_, _args_...) \
fprintf(stderr, "\e[1;37mDEBUG: %s:%d:%s(): \e[1;33m" _fmt_ "\e[1;37m\n", __FILE__, __LINE__, __func__, ##_args_)
fprintf(stderr, "\e[1;37mDEBUG: %s:%d:%s: \e[1;33m" _fmt_ "\e[1;37m\n", AUDIO_DEBUG_FILENAME, __LINE__, __PRETTY_FUNCTION__, ##_args_)
# define AUDIO_DEBUG_CHECK(_exp_) \
if (!(_exp_)) \
AUDIO_DEBUG_PRINT("\e[0;31mCondition (%s) failed", #_exp_)
Expand Down
9 changes: 9 additions & 0 deletions internal/c/libqb/include/libqb-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,13 @@
#define QB_FALSE 0
#define QB_TRUE -1

#ifndef _countof
# ifdef __cplusplus
# include <cstddef>
template <typename T, size_t N> static inline constexpr size_t _countof(T const (&)[N]) noexcept { return N; }
# else
# define _countof(Array_) (sizeof(Array_) / sizeof(Array_[0]))
# endif
#endif

#endif
Loading