Skip to content

Commit

Permalink
Teensy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Mar 31, 2024
1 parent dd4f056 commit 5519a7d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion modules/common/chowdsp_core/Memory/chowdsp_AlignedAlloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@

namespace chowdsp
{
#if defined(_MSC_VER)
#if JUCE_TEENSY

/** MSVC-compatible implementation of aligned_alloc */
[[nodiscard]] inline void* aligned_alloc ([[maybe_unused]] size_t alignment, size_t size)
{
// @TODO
return malloc (size + alignment);
}

/** MSVC-compatible implementation of aligned_free */
inline void aligned_free (void* data)
{
free (data);
}

#elif defined(_MSC_VER)

/** MSVC-compatible implementation of aligned_alloc */
[[nodiscard]] inline void* aligned_alloc (size_t alignment, size_t size)
Expand Down

0 comments on commit 5519a7d

Please sign in to comment.