Skip to content

Commit

Permalink
Merge pull request QB64-Phoenix-Edition#568 from a740g/audio-ma_vfs-test
Browse files Browse the repository at this point in the history
miniaudio file name hashing fix
  • Loading branch information
a740g authored Nov 19, 2024
2 parents 137dfb4 + cc7eb44 commit 4f2bd9e
Show file tree
Hide file tree
Showing 10 changed files with 600 additions and 288 deletions.
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

0 comments on commit 4f2bd9e

Please sign in to comment.