MiniAudioImplementation.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/PlatformDef.h>
  9. // warning C4701: potentially uninitialized local variable 'mid' used in vorbis
  10. // warning C4244: '=': conversion from 'int' to 'int8', possible loss of data
  11. // warning C4456: declaration of 'z' hides previous local declaration
  12. // warning C4457: declaration of 'n' hides function parameter
  13. // warning C4245: '=': conversion from 'int' to 'uint32', signed /unsigned mismatch
  14. AZ_PUSH_DISABLE_WARNING(4701 4244 4456 4457 4245, "-Wuninitialized")
  15. extern "C" {
  16. #define STB_VORBIS_HEADER_ONLY
  17. #include <stb_vorbis.c> // Enables Vorbis decoding.
  18. }
  19. #define MINIAUDIO_IMPLEMENTATION
  20. #include <miniaudio.h>
  21. extern "C" {
  22. // The stb_vorbis implementation must come after the implementation of miniaudio.
  23. #undef STB_VORBIS_HEADER_ONLY
  24. #include <stb_vorbis.c>
  25. }
  26. AZ_POP_DISABLE_WARNING