OpenShot Audio Library (libopenshot-audio) is a free, open-source project that enables high-quality editing and playback of audio, and is based on the amazing JUCE library.
The CMake Project is renamed to "OpenShotAudio", which better conforms to CMake naming conventions. (The openshot-audio library target name and libopenshot-audio library name are unchanged, internally.)
The main installed header file has been renamed from JuceHeader.h to OpenShotAudio.h. A copy (or symlink, depending on CMake version and OS capabilities) under the old name is still installed for compatibility, but should be considered legacy. Any references to JuceHeader.h in downstream code (including libopenshot) should be changed to OpenShotAudio.h at the earliest convenience.
The build now creates a standard CMake EXPORTED configuration which defines all relevant parameters for the build output, both in the build tree and in any subsequent install tree. This makes the FindOpenShotAudio.cmake file in libopenshot's build unnecessary, and represents a more complete and robust method of establishing a dependency relationship with library consumers. All of the information needed to build projects that link with libopenshot-audio are written to the new OpenShotAudio-Config.cmake and OpenShotAudioTargets.cmake output files.
Externally, in keeping with CMake conventions, the library target is EXPORTED as OpenShot::Audio, and should be referred to that way by consumers:
find_package(OpenShotAudio)
target_link_libraries(openshot PUBLIC OpenShot::Audio)
ASIO SDK discovery on Windows platforms is moved from inline code to a FindASIO.cmake module, which is also included in the EXPORTED configuration for use by downstream library consumers.
The simple openshot-audio-test-sound program has been renamed to openshot-audio-demo, and is completely rewritten in a more modern code style, making better use of C++11 STL classes and idioms.
The function of the tool has also been enhanced to make better use of the JUCE capabilities required by libopenshot: A list of all discovered audio devices present on the system is first generated and displayed, before a test tone plays on the default output. (Actually, 5 test tones, precisely 2 seconds apart. deviceManager.playTestSound() in recent JUCE releases triggers only a brief "beep" on each call, rather than playing a continuous tone, so I took the opportunity to demonstrate std::this_thread::sleep_until and the std::chrono timer classes.)
The binary's configuration is also included in the EXPORTED data, and may be referenced downstream as the OpenShot::openshot-audio-demo target.
Merging this, as it's needed to get builds back on track. It should be fully backwards-compatible with older configs, anyway. (The FindOpenShotAudio.cmake module will still work to discover it...)
This PR changes the build system in several ways:
openshot-audio
library target name andlibopenshot-audio
library name are unchanged, internally.)JuceHeader.h
toOpenShotAudio.h
. A copy (or symlink, depending on CMake version and OS capabilities) under the old name is still installed for compatibility, but should be considered legacy. Any references toJuceHeader.h
in downstream code (including libopenshot) should be changed toOpenShotAudio.h
at the earliest convenience.EXPORTED
configuration which defines all relevant parameters for the build output, both in the build tree and in any subsequent install tree. This makes theFindOpenShotAudio.cmake
file in libopenshot's build unnecessary, and represents a more complete and robust method of establishing a dependency relationship with library consumers. All of the information needed to build projects that link with libopenshot-audio are written to the newOpenShotAudio-Config.cmake
andOpenShotAudioTargets.cmake
output files.EXPORTED
asOpenShot::Audio
, and should be referred to that way by consumers:FindASIO.cmake
module, which is also included in theEXPORTED
configuration for use by downstream library consumers.openshot-audio-test-sound
program has been renamed toopenshot-audio-demo
, and is completely rewritten in a more modern code style, making better use of C++11 STL classes and idioms. The function of the tool has also been enhanced to make better use of the JUCE capabilities required by libopenshot: A list of all discovered audio devices present on the system is first generated and displayed, before a test tone plays on the default output. (Actually, 5 test tones, precisely 2 seconds apart.deviceManager.playTestSound()
in recent JUCE releases triggers only a brief "beep" on each call, rather than playing a continuous tone, so I took the opportunity to demonstratestd::this_thread::sleep_until
and thestd::chrono
timer classes.) The binary's configuration is also included in theEXPORTED
data, and may be referenced downstream as theOpenShot::openshot-audio-demo
target.