add more tinyaudio preparation, some test wav files, play sound on collision events. Will expose this in the C-API to pick wav files and collision threshold levels etc. Use the premake --audio flag to try it out. The TinyAudio example in the ExampleBrowser works on Mac, Linux and Windows, you can play notes by pressing keys.
This commit is contained in:
@@ -282,7 +282,36 @@ if os.is("Windows") then
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if _OPTIONS["audio"] then
|
||||
files {
|
||||
"../TinyAudio/b3ADSR.cpp",
|
||||
"../TinyAudio/b3AudioListener.cpp",
|
||||
"../TinyAudio/b3ReadWavFile.cpp",
|
||||
"../TinyAudio/b3SoundEngine.cpp",
|
||||
"../TinyAudio/b3SoundSource.cpp",
|
||||
"../TinyAudio/b3WriteWavFile.cpp",
|
||||
"../TinyAudio/RtAudio.cpp",
|
||||
}
|
||||
|
||||
defines {"B3_ENABLE_TINY_AUDIO"}
|
||||
|
||||
if os.is("Windows") then
|
||||
links {"winmm","Wsock32","dsound"}
|
||||
defines {"WIN32","__WINDOWS_MM__","__WINDOWS_DS__"}
|
||||
end
|
||||
|
||||
if os.is("Linux") then initX11()
|
||||
defines {"__OS_LINUX__","__LINUX_ALSA__"}
|
||||
links {"asound","pthread"}
|
||||
end
|
||||
|
||||
|
||||
if os.is("MacOSX") then
|
||||
links{"Cocoa.framework"}
|
||||
links{"CoreAudio.framework", "coreMIDI.framework", "Cocoa.framework"}
|
||||
defines {"__OS_MACOSX__","__MACOSX_CORE__"}
|
||||
end
|
||||
end
|
||||
includedirs {
|
||||
".","../../src", "../ThirdPartyLibs",
|
||||
"../ThirdPartyLibs/openvr/headers",
|
||||
|
||||
Reference in New Issue
Block a user