Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Audio Support #778

Open
wants to merge 145 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
dd59a56
Implement custom sequences and the audio editor.
louist103 Jun 28, 2024
e90cab7
Fix implicit function declaration `AudioEditor_GetReplacementSeq`
louist103 Jun 28, 2024
79cd020
Fix mac again.
louist103 Jun 28, 2024
cac05a1
String and header cleanup
louist103 Jun 28, 2024
a6fae26
Oops
louist103 Jun 28, 2024
eb9f3e6
WIP ZIP Sound fonts
louist103 Jun 30, 2024
65a1405
The game opens and audio seems to play correctly. Needs extensive tes…
louist103 Jun 30, 2024
5b25e62
Name sequences
louist103 Jul 1, 2024
bc92ebf
Cleanup the SF importer a little.
louist103 Jul 1, 2024
aae5f59
XML Sequences good
louist103 Jul 3, 2024
eadf08d
Fix mac
louist103 Jul 3, 2024
3e9e50a
Destructor
louist103 Jul 4, 2024
6a0bcbe
Bump submodule
louist103 Jul 4, 2024
e0d55e7
Thread safe queue
louist103 Jul 18, 2024
92d4eee
Add WAV decoder
louist103 Jul 18, 2024
0eb669f
sequenceMap->mSequenceMap and a string fix
louist103 Jul 18, 2024
c46d738
Streamed sequence importer
louist103 Jul 18, 2024
ae494b0
Add s16 sample processing.
louist103 Aug 17, 2024
36033f3
Fix drwave define
louist103 Aug 17, 2024
953ba73
Fix STB
louist103 Aug 17, 2024
93296bc
Reorder the loading to enable custom sound fonts
louist103 Aug 24, 2024
d6f0e20
New streamed solution
louist103 Aug 24, 2024
ca56117
Bump exporter
louist103 Aug 24, 2024
1465f7b
Generate 1 minute long looping sequence.
louist103 Aug 25, 2024
0cf00df
Very long sample support (113 minutes or so)
louist103 Aug 27, 2024
63b305e
MP3 Decoding
louist103 Aug 27, 2024
915169b
Don't byteswap the crc from XML.
louist103 Aug 27, 2024
6bcf490
WIP OGG
louist103 Sep 1, 2024
bb16026
add windows cmake stuff (broken) and fixes to OGG
louist103 Sep 5, 2024
cc7f341
Just throw more cores at the problem
louist103 Sep 5, 2024
ce93ca0
Dynamically allocate fontMap
louist103 Sep 6, 2024
bb2c084
Re-add OOB read fix from old branch
louist103 Sep 6, 2024
2a73ed4
FLAC decoder, threads for the other compressed formats
louist103 Sep 6, 2024
a5c7dfc
Remove thread from class
louist103 Sep 6, 2024
b43edd4
timings
louist103 Sep 23, 2024
d0fc330
cleanup conflicts
louist103 Sep 24, 2024
3f404df
update submodules
louist103 Sep 24, 2024
d0b2c97
update submodules
louist103 Sep 24, 2024
5c0225b
update submodules
louist103 Sep 25, 2024
d8ea4ed
loop or not to loop
louist103 Oct 3, 2024
a58ed3d
named audio XML
louist103 Oct 3, 2024
734726e
Update submodules
louist103 Oct 5, 2024
49d9fe8
merge
louist103 Oct 5, 2024
bfa9706
format
louist103 Oct 5, 2024
9f3d846
format again cause git didnt see it for some reason
louist103 Oct 5, 2024
2019e98
move drlib to submodule
louist103 Oct 5, 2024
e186dce
Conflict
louist103 Oct 5, 2024
6ccc5fc
Merge branch 'develop' into customAudio2
louist103 Oct 5, 2024
628b823
Update apt-deps.txt
louist103 Oct 5, 2024
15ce6e9
Fix for new cmake
louist103 Oct 5, 2024
d4411b5
fix game interactor
louist103 Oct 5, 2024
fb2302f
Update macports-deps.txt
louist103 Oct 5, 2024
a4cdbc1
PR fixes and fix OTRExporter for mac
louist103 Oct 5, 2024
a41d090
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 5, 2024
dc96e96
format
louist103 Oct 5, 2024
158648f
format
louist103 Oct 6, 2024
955a329
ifdef intrin header
louist103 Oct 6, 2024
fd97c91
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 6, 2024
07c9a08
Docs
louist103 Oct 6, 2024
27c2522
use macro for preview
louist103 Oct 8, 2024
da1cf35
Small fixes
louist103 Oct 8, 2024
96cd60f
format
louist103 Oct 8, 2024
c24f0d2
fix 2nd day clock town
louist103 Oct 9, 2024
e3a7e82
Update exporter
louist103 Oct 10, 2024
dc779a5
Fix duplicate global in stubs.c
louist103 Oct 11, 2024
3493553
restore editor to use cvars again sadge
louist103 Oct 11, 2024
414b832
Format
louist103 Oct 11, 2024
0fb8f67
Merge branch 'develop' into customAudio2
louist103 Oct 11, 2024
a14ba79
warn if more than 255 sequences
louist103 Oct 12, 2024
d6615c5
use main seq player to avoid an overflow
louist103 Oct 12, 2024
1917d67
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 12, 2024
852e1e1
fix the wrong seq playing in the editor again
louist103 Oct 14, 2024
379bc5d
16 bit seqIds
louist103 Oct 18, 2024
ae29eb7
fix shop crash
louist103 Oct 19, 2024
795586e
format
louist103 Oct 19, 2024
dd17321
cleanups
louist103 Oct 19, 2024
69cc9cc
Delete audio collection
louist103 Oct 20, 2024
3b92153
Add entry to modern menu
louist103 Oct 20, 2024
5a184a5
Cleanup the audio collection
louist103 Oct 20, 2024
9f1e6ab
fix clock town randomization
louist103 Oct 20, 2024
98af18f
format
louist103 Oct 20, 2024
e3f9cc5
format again
louist103 Oct 22, 2024
0433a89
some fixes for custom audio (#1)
mckinlee Oct 23, 2024
a53439e
how I would sort the sequences (#2)
louist103 Oct 24, 2024
edfa595
Adjustments to ocarina song types
louist103 Oct 27, 2024
754bc74
stereo
louist103 Oct 28, 2024
0645457
format
louist103 Oct 31, 2024
e4d0941
Loop point support
louist103 Nov 3, 2024
7f0e6ae
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Nov 3, 2024
3afe66a
Merge branch 'develop' into customAudio2
louist103 Nov 5, 2024
c4021da
Merge remote-tracking branch 'upstream/develop' into customAudio2
louist103 Nov 7, 2024
5e44d8c
Part of a PR review
louist103 Nov 7, 2024
febed7b
Remove drlib submodule
louist103 Nov 8, 2024
7be4dc7
Clarify change
louist103 Nov 8, 2024
acbe2f7
Merge branch 'develop' into customAudio2
louist103 Nov 8, 2024
54478a1
Format
louist103 Nov 8, 2024
5c970f0
Add tag
louist103 Nov 8, 2024
e83d8b7
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Nov 8, 2024
ca33b1f
switch to find_package
Archez Nov 8, 2024
bedafde
bump ZAPDTR
louist103 Nov 9, 2024
8dd127d
Milk bar day/night fix
louist103 Nov 12, 2024
23ca06f
x86 SIMD for aMixImpl
louist103 Nov 23, 2024
92c8402
Merge branch 'develop' into customAudio2
louist103 Nov 23, 2024
5e98ea5
format
louist103 Nov 23, 2024
b6a3bf8
NEON
louist103 Nov 24, 2024
a76f1f8
format
louist103 Nov 24, 2024
d54c4b8
remove | 0x900 causing a crash
louist103 Nov 25, 2024
8a00f35
Asan fixes
louist103 Nov 25, 2024
75cd5d2
add missing define for MSVC
louist103 Nov 25, 2024
7e3c33f
Clock town fixes
louist103 Nov 27, 2024
04e46aa
format
louist103 Nov 27, 2024
ff5c0d3
Fix underscore logic in audio collection
louist103 Nov 28, 2024
1c0568f
Use torch sample XML format
louist103 Nov 28, 2024
815f46a
fix font map size and format
louist103 Nov 28, 2024
fa35e34
quick fix
louist103 Nov 28, 2024
75d01ba
Update exporter
louist103 Dec 2, 2024
7fdc75b
Opus
louist103 Dec 7, 2024
ea3ed23
actions packages
louist103 Dec 7, 2024
5dca7d0
fix it again?
louist103 Dec 7, 2024
7143c4f
Fix a few missed 16 bit masks
louist103 Dec 8, 2024
1190fbd
Remove unused stubs
louist103 Dec 8, 2024
a4cb09d
Revert "Fix a few missed 16 bit masks"
louist103 Dec 16, 2024
eb8370a
Opus decoding
louist103 Dec 18, 2024
5bcc466
Fixes for linux and other things
louist103 Dec 19, 2024
c2e5240
free opus data
louist103 Dec 19, 2024
bc38f2e
format
louist103 Dec 19, 2024
254e4b3
Update FindOpusFile.cmake
louist103 Dec 19, 2024
5ac7177
bria's fix?
louist103 Dec 20, 2024
dfc090d
Merge branch 'develop' into customAudio2
louist103 Dec 20, 2024
e2b9307
Update BenMenuBar.cpp
louist103 Dec 20, 2024
836d8d3
Update BenMenuBar.cpp
louist103 Dec 20, 2024
15a3ed7
Split ocarina tabs
louist103 Dec 21, 2024
b71d9bb
better error handling
louist103 Dec 21, 2024
fc4d1fc
Remove unused vectors
louist103 Dec 21, 2024
8364276
move audio editor to enhancements
louist103 Dec 22, 2024
2ac2982
Fix mac again?
louist103 Dec 25, 2024
56a4cab
Final cleanups
louist103 Dec 29, 2024
acfcbfc
merge
louist103 Dec 29, 2024
026315a
Format
louist103 Dec 29, 2024
59c45ba
extern C
louist103 Dec 29, 2024
cc4197c
Allow custom fanfares to be used in songs
louist103 Jan 5, 2025
66de11a
Conflicts, add audio editor back to new menu
louist103 Jan 28, 2025
35533d3
format
louist103 Jan 28, 2025
771f9eb
WIP sf editor support
louist103 Feb 16, 2025
3ad6535
Merge remote-tracking branch 'refs/remotes/origin/customAudio2' into …
louist103 Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apt-deps.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build libogg-dev libopus-dev opus-tools libopusfile-dev libvorbis-dev
2 changes: 1 addition & 1 deletion .github/workflows/macports-deps.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal libogg +universal libopus +universal opusfile +universal libvorbis +universal
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
url = https://github.com/louist103/OTRExporter.git
[submodule "ZAPDTR"]
path = ZAPDTR
url = https://github.com/louist103/ZAPDTR.git
url = https://github.com/louist103/ZAPDTR.git
61 changes: 61 additions & 0 deletions CMake/FindOgg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# - Find ogg
# Find the native ogg includes and libraries
#
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
# OGG_LIBRARIES - List of libraries when using ogg.
# OGG_FOUND - True if ogg found.

if (OGG_INCLUDE_DIR)
# Already in cache, be silent
set(OGG_FIND_QUIETLY TRUE)
endif ()

find_package (PkgConfig QUIET)
pkg_check_modules (PC_OGG QUIET ogg>=1.3.0)

set (OGG_VERSION ${PC_OGG_VERSION})

find_path (OGG_INCLUDE_DIR ogg/ogg.h
HINTS
${PC_OGG_INCLUDEDIR}
${PC_OGG_INCLUDE_DIRS}
${OGG_ROOT}
)
# MSVC built ogg may be named ogg_static.
# The provided project files name the library with the lib prefix.
find_library (OGG_LIBRARY
NAMES
ogg
ogg_static
libogg
libogg_static
HINTS
${PC_OGG_LIBDIR}
${PC_OGG_LIBRARY_DIRS}
${OGG_ROOT}
)
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
# to TRUE if all listed variables are TRUE.
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (Ogg
REQUIRED_VARS
OGG_LIBRARY
OGG_INCLUDE_DIR
VERSION_VAR
OGG_VERSION
)

if (OGG_FOUND)
set (OGG_LIBRARIES ${OGG_LIBRARY})
set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})

if(NOT TARGET Ogg::ogg)
add_library(Ogg::ogg UNKNOWN IMPORTED)
set_target_properties(Ogg::ogg PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
IMPORTED_LOCATION "${OGG_LIBRARIES}"
)
endif ()
endif ()

mark_as_advanced (OGG_INCLUDE_DIR OGG_LIBRARY)
44 changes: 44 additions & 0 deletions CMake/FindOpus.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - FindOpus.cmake
# Find the native opus includes and libraries
#
# OPUS_INCLUDE_DIRS - where to find opus/opus.h, etc.
# OPUS_LIBRARIES - List of libraries when using libopus(file).
# OPUS_FOUND - True if libopus found.

if(OPUS_INCLUDE_DIR AND OPUS_LIBRARY AND OPUSFILE_LIBRARY)
# Already in cache, be silent
set(OPUS_FIND_QUIETLY TRUE)
endif(OPUS_INCLUDE_DIR AND OPUS_LIBRARY AND OPUSFILE_LIBRARY)

find_path(OPUS_INCLUDE_DIR
NAMES opusfile.h
PATH_SUFFIXES opus
)

# MSVC built opus may be named opus_static
# The provided project files name the library with the lib prefix.
find_library(OPUS_LIBRARY
NAMES opus opus_static libopus libopus_static
)
#find_library(OPUSFILE_LIBRARY
# NAMES opusfile opusfile_static libopusfile libopusfile_static
#)

# Handle the QUIETLY and REQUIRED arguments and set OPUS_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Opus DEFAULT_MSG
OPUS_LIBRARY OPUS_INCLUDE_DIR
)

if(OPUS_FOUND)
set(OPUS_LIBRARIES ${OPUS_LIBRARY})
set(OPUS_INCLUDE_DIRS ${OPUS_INCLUDE_DIR})
if(NOT TARGET Opus::opus)
add_library(Opus::opus UNKNOWN IMPORTED)
set_target_properties(Opus::opus PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIRS}"
IMPORTED_LOCATION "${OPUS_LIBRARIES}"
)
endif()
endif(OPUS_FOUND)
55 changes: 55 additions & 0 deletions CMake/FindOpusFile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# FindOpusFile.cmake
# Locate the libopusfile library and its dependencies (libopus and libogg).
# Defines the following variables on success:
# OPUSFILE_FOUND - Indicates if opusfile was found
# OPUSFILE_INCLUDE_DIR - Directory containing opusfile.h
# OPUSFILE_LIBRARY - Path to the opusfile library
# OPUSFILE_LIBRARIES - Full list of libraries to link (opusfile, opus, ogg)

# Search for the OpusFile header
find_path(OPUSFILE_INCLUDE_DIR
NAMES opusfile.h
PATHS /usr/include/opus /usr/local/include/opus /opt/local/include/opus
DOC "Directory where opusfile.h is located"
)

# Search for the OpusFile library
find_library(OPUSFILE_LIBRARY
NAMES opusfile
DOC "Path to the libopusfile library"
)

# Search for the Opus library (dependency of OpusFile)
find_library(OPUS_LIBRARY
NAMES opus
DOC "Path to the libopus library (dependency of libopusfile)"
)

# Search for the Ogg library (dependency of OpusFile)
find_library(OGG_LIBRARY
NAMES ogg
DOC "Path to the libogg library (dependency of libopusfile)"
)

# Check if all required components are found
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpusFile
REQUIRED_VARS OPUSFILE_LIBRARY OPUSFILE_INCLUDE_DIR OPUS_LIBRARY OGG_LIBRARY
VERSION_VAR OPUSFILE_VERSION
)

# Define an imported target if everything is found
if (OPUSFILE_FOUND)
add_library(Opusfile::Opusfile INTERFACE IMPORTED)

set_target_properties(Opusfile::Opusfile PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OPUSFILE_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${OPUSFILE_LIBRARY};${OPUS_LIBRARY};${OGG_LIBRARY}"
)

# Optionally expose the include and libraries separately
set(OPUSFILE_LIBRARIES ${OPUSFILE_LIBRARY} ${OPUS_LIBRARY} ${OGG_LIBRARY})
set(OPUSFILE_INCLUDE_DIRS ${OPUSFILE_INCLUDE_DIR})
else()
set(OPUSFILE_FOUND FALSE)
endif()
210 changes: 210 additions & 0 deletions CMake/FindVorbis.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
#[=======================================================================[.rst:
FindVorbis
----------

Finds the native vorbis, vorbisenc amd vorbisfile includes and libraries.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following imported targets, if found:

``Vorbis::vorbis``
The Vorbis library
``Vorbis::vorbisenc``
The VorbisEnc library
``Vorbis::vorbisfile``
The VorbisFile library

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``Vorbis_Vorbis_INCLUDE_DIRS``
List of include directories when using vorbis.
``Vorbis_Enc_INCLUDE_DIRS``
List of include directories when using vorbisenc.
``Vorbis_File_INCLUDE_DIRS``
List of include directories when using vorbisfile.
``Vorbis_Vorbis_LIBRARIES``
List of libraries when using vorbis.
``Vorbis_Enc_LIBRARIES``
List of libraries when using vorbisenc.
``Vorbis_File_LIBRARIES``
List of libraries when using vorbisfile.
``Vorbis_FOUND``
True if vorbis and requested components found.
``Vorbis_Vorbis_FOUND``
True if vorbis found.
``Vorbis_Enc_FOUND``
True if vorbisenc found.
``Vorbis_Enc_FOUND``
True if vorbisfile found.

Cache variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``Vorbis_Vorbis_INCLUDE_DIR``
The directory containing ``vorbis/vorbis.h``.
``Vorbis_Enc_INCLUDE_DIR``
The directory containing ``vorbis/vorbisenc.h``.
``Vorbis_File_INCLUDE_DIR``
The directory containing ``vorbis/vorbisenc.h``.
``Vorbis_Vorbis_LIBRARY``
The path to the vorbis library.
``Vorbis_Enc_LIBRARY``
The path to the vorbisenc library.
``Vorbis_File_LIBRARY``
The path to the vorbisfile library.

Hints
^^^^^

A user may set ``Vorbis_ROOT`` to a vorbis installation root to tell this module where to look.

#]=======================================================================]

if (Vorbis_Vorbis_INCLUDE_DIR)
# Already in cache, be silent
set (Vorbis_FIND_QUIETLY TRUE)
endif ()

set (Vorbis_Vorbis_FIND_QUIETLY TRUE)
set (Vorbis_Enc_FIND_QUIETLY TRUE)
set (Vorbis_File_FIND_QUIETLY TRUE)

find_package (Ogg QUIET)

find_package (PkgConfig QUIET)
pkg_check_modules (PC_Vorbis_Vorbis QUIET vorbis)
pkg_check_modules (PC_Vorbis_Enc QUIET vorbisenc)
pkg_check_modules (PC_Vorbis_File QUIET vorbisfile)

set (Vorbis_VERSION ${PC_Vorbis_Vorbis_VERSION})

find_path (Vorbis_Vorbis_INCLUDE_DIR vorbis/codec.h
HINTS
${PC_Vorbis_Vorbis_INCLUDEDIR}
${PC_Vorbis_Vorbis_INCLUDE_DIRS}
${Vorbis_ROOT}
)

find_path (Vorbis_Enc_INCLUDE_DIR vorbis/vorbisenc.h
HINTS
${PC_Vorbis_Enc_INCLUDEDIR}
${PC_Vorbis_Enc_INCLUDE_DIRS}
${Vorbis_ROOT}
)

find_path (Vorbis_File_INCLUDE_DIR vorbis/vorbisfile.h
HINTS
${PC_Vorbis_File_INCLUDEDIR}
${PC_Vorbis_File_INCLUDE_DIRS}
${Vorbis_ROOT}
)

find_library (Vorbis_Vorbis_LIBRARY
NAMES
vorbis
vorbis_static
libvorbis
libvorbis_static
HINTS
${PC_Vorbis_Vorbis_LIBDIR}
${PC_Vorbis_Vorbis_LIBRARY_DIRS}
${Vorbis_ROOT}
)

find_library (Vorbis_Enc_LIBRARY
NAMES
vorbisenc
vorbisenc_static
libvorbisenc
libvorbisenc_static
HINTS
${PC_Vorbis_Enc_LIBDIR}
${PC_Vorbis_Enc_LIBRARY_DIRS}
${Vorbis_ROOT}
)

find_library (Vorbis_File_LIBRARY
NAMES
vorbisfile
vorbisfile_static
libvorbisfile
libvorbisfile_static
HINTS
${PC_Vorbis_File_LIBDIR}
${PC_Vorbis_File_LIBRARY_DIRS}
${Vorbis_ROOT}
)

include (FindPackageHandleStandardArgs)

if (Vorbis_Vorbis_LIBRARY AND Vorbis_Vorbis_INCLUDE_DIR AND Ogg_FOUND)
set (Vorbis_Vorbis_FOUND TRUE)
endif ()

if (Vorbis_Enc_LIBRARY AND Vorbis_Enc_INCLUDE_DIR AND Vorbis_Vorbis_FOUND)
set (Vorbis_Enc_FOUND TRUE)
endif ()

if (Vorbis_Vorbis_FOUND AND Vorbis_File_LIBRARY AND Vorbis_File_INCLUDE_DIR)
set (Vorbis_File_FOUND TRUE)
endif ()

find_package_handle_standard_args (Vorbis
REQUIRED_VARS
Vorbis_Vorbis_LIBRARY
Vorbis_Vorbis_INCLUDE_DIR
Ogg_FOUND
HANDLE_COMPONENTS
VERSION_VAR Vorbis_VERSION)


if (Vorbis_Vorbis_FOUND)
set (Vorbis_Vorbis_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
set (Vorbis_Vorbis_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARIES})
if (NOT TARGET Vorbis::vorbis)
add_library (Vorbis::vorbis UNKNOWN IMPORTED)
set_target_properties (Vorbis::vorbis PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_Vorbis_INCLUDE_DIR}"
IMPORTED_LOCATION "${Vorbis_Vorbis_LIBRARY}"
INTERFACE_LINK_LIBRARIES Ogg::ogg
)
endif ()

if (Vorbis_Enc_FOUND)
set (Vorbis_Enc_INCLUDE_DIRS ${Vorbis_Enc_INCLUDE_DIR})
set (Vorbis_Enc_LIBRARIES ${Vorbis_Enc_LIBRARY} ${Vorbis_Enc_LIBRARIES})
if (NOT TARGET Vorbis::vorbisenc)
add_library (Vorbis::vorbisenc UNKNOWN IMPORTED)
set_target_properties (Vorbis::vorbisenc PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_Enc_INCLUDE_DIR}"
IMPORTED_LOCATION "${Vorbis_Enc_LIBRARY}"
INTERFACE_LINK_LIBRARIES Vorbis::vorbis
)
endif ()
endif ()

if (Vorbis_File_FOUND)
set (Vorbis_File_INCLUDE_DIRS ${Vorbis_File_INCLUDE_DIR})
set (Vorbis_File_LIBRARIES ${Vorbis_File_LIBRARY} ${Vorbis_File_LIBRARIES})
if (NOT TARGET Vorbis::vorbisfile)
add_library (Vorbis::vorbisfile UNKNOWN IMPORTED)
set_target_properties (Vorbis::vorbisfile PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_File_INCLUDE_DIR}"
IMPORTED_LOCATION "${Vorbis_File_LIBRARY}"
INTERFACE_LINK_LIBRARIES Vorbis::vorbis
)
endif ()
endif ()

endif ()

mark_as_advanced (Vorbis_Vorbis_INCLUDE_DIR Vorbis_Vorbis_LIBRARY)
mark_as_advanced (Vorbis_Enc_INCLUDE_DIR Vorbis_Enc_LIBRARY)
mark_as_advanced (Vorbis_File_INCLUDE_DIR Vorbis_File_LIBRARY)
Loading