juce_audio_devices.h duplicate include in conditional



#include "../juce_audio_formats/juce_audio_formats.h"

The problem here is that the amalgamation tool will inline juce_audio_formats.h within the #if directive. Future #includes will be skipped of course (since the tool thinks it was already included).

This creates a compile error where nothing in juce_audio_formats.h is visible if juce_audio_devices.h is included beforehand.

I am working around this in my amalgamation templates by manually including juce_audio_formats.h but it would be nice to have a more permanent solution so this never happens again.


When I had this problem before, I used to add a special comment after the #include directive, which told the amalgamator not to include that file. Can’t remember what the comment was, but you probably want to do that.


We don’t want to use FORCE_AMALGAMATOR_INCLUDE here because then it would be inlined twice