Skip to content

Commit

Permalink
Allow opting-out of audio
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Feb 29, 2024
1 parent db9fbbd commit ea37f6b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 6 deletions.
1 change: 1 addition & 0 deletions project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<compilerflag value="-DSTATIC_LINK" if="NME_STATIC_LINK" />
<compilerflag value="-DNME_CLIPPER" if="NME_CLIPPER" />
<compilerflag value="-DNME_INTERNAL_CLIPPING" if="NME_INTERNAL_CLIPPING" />
<compilerflag value="-DNME_AUDIO" unless="NME_NO_AUDIO" />

<cache value="1" />

Expand Down
11 changes: 6 additions & 5 deletions project/ToolkitBuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

<set name="NME_SDL_ANY" value="1" if="NME_NATIVE_SDL_SYSTEM" />
<set name="NME_SDL_ANY" value="1" if="NME_SDL2" />
<set name="NME_MIXER" value="1" if="NME_SDL_ANY" />
<set name="NME_MIXER" value="1" if="NME_SDL_ANY" unless="NME_NO_AUDIO" />

<!-- Use opengl backend ? -->
<set name="NME_NO_OGL" if="winrt" unless="NME_ANGLE" />
Expand Down Expand Up @@ -221,6 +221,7 @@
<compilerflag value="-DNME_ANGLE" if="NME_ANGLE" />
<compilerflag value="-DNME_OGL" if="NME_OGL" />
<compilerflag value="-DNME_METAL" if="NME_METAL" />
<compilerflag value="-DNME_AUDIO" unless="NME_NO_AUDIO" />
<compilerflag value="-I${ANGLE_DIR}/include" if="NME_ANGLE" />

<cache value="1" unless="winrpi" />
Expand Down Expand Up @@ -267,7 +268,7 @@
<file name="${SRC_DIR}/iPhone/System.mm"/>
<file name="${SRC_DIR}/apple/Utils.mm"/>
<file name="${SRC_DIR}/cocoa/FileManager.mm"/>
<file name="${SRC_DIR}/audio/IosSound.mm"/>
<file name="${SRC_DIR}/audio/IosSound.mm" unless="NME_NO_AUDIO"/>
</section>

<section if="android">
Expand All @@ -278,7 +279,7 @@
<file name="${SRC_DIR}/android/JNI.cpp"/>
<file name="${SRC_DIR}/android/System.cpp"/>
<file name="${SRC_DIR}/android/AndroidS3D.cpp" if="NME_S3D" />
<file name="${SRC_DIR}/audio/OpenSlSound.cpp" />
<file name="${SRC_DIR}/audio/OpenSlSound.cpp" unless="NME_NO_AUDIO" />

</section>

Expand Down Expand Up @@ -364,7 +365,7 @@
</section>

<section if="NME_OPENAL">
<file name="${SRC_DIR}/audio/OpenALSound.cpp" />
<file name="${SRC_DIR}/audio/OpenALSound.cpp" unless="NME_NO_AUDIO" />
<compilerflag value="-DNME_OPENAL" />
</section>

Expand Down Expand Up @@ -411,7 +412,7 @@

<file name="${SRC_DIR}/audio/Audio.cpp" />
<file name="${SRC_DIR}/audio/ChannelList.cpp" />
<file name="${SRC_DIR}/audio/Sound.cpp" />
<file name="${SRC_DIR}/audio/Sound.cpp" unless="NME_NO_AUDIO" />

<file name="${SRC_DIR}/common/XML/tinystr.cpp"/>
<file name="${SRC_DIR}/common/XML/tinyxml.cpp"/>
Expand Down
Loading

0 comments on commit ea37f6b

Please sign in to comment.