-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 45faf7d
Showing
381 changed files
with
151,592 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build86/ | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
project(snd_drv) | ||
|
||
include_directories(${CMAKE_SOURCE_DIR}/dependencies/soloud/include) | ||
link_directories(${CMAKE_SOURCE_DIR}/dependencies/soloud/lib) | ||
|
||
# set output directories | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:threadSafeInit- /MP") | ||
|
||
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) | ||
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib) | ||
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES) | ||
|
||
# Disable exceptions | ||
string(REGEX REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
|
||
# Statically compile runtime | ||
string(REGEX REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") | ||
|
||
#target_compile_options(snd_drv PUBLIC "$<$<CONFIG:Release>:/MT>") | ||
|
||
|
||
add_subdirectory(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Debug/ | ||
*.XML | ||
_UpgradeReport_Files/ | ||
*.ipch | ||
*.opensdf | ||
*.sdf | ||
*.old | ||
*.filters | ||
build/ | ||
*.aux | ||
*.out | ||
*.gz | ||
*.toc | ||
*.o | ||
incoming/ | ||
experiments/ | ||
doc/*.html | ||
doc/*.tex | ||
doc/*.css | ||
doc/*.pdf | ||
doc/*.mobi | ||
doc/*.epub | ||
bin/audio/ | ||
bin/ | ||
lib/*.ilk | ||
lib/*.lib | ||
lib/*.dll | ||
out/ | ||
*.pyc | ||
*.exp | ||
doc/xelatex_output.txt | ||
doc/kindlegen_output.txt | ||
*.idb | ||
*.pdb | ||
doc/20* | ||
glue/soloud* | ||
scripts/soloud_codegen.py | ||
glue/rpgmaker_soloud.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ext/libmodplug"] | ||
path = ext/libmodplug | ||
url = https://github.com/jarikomppa/libmodplug.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
If you wish to contribute code to SoLoud, add your name to | ||
this list when sending a pull request. All code must be | ||
either public domain, CC0, wtfpl, zlib/libpng licensed, or | ||
similarly free to use (without attribution, or (l)gpl-like | ||
limitations. | ||
|
||
Jari Komppa http://iki.fi/sol/ | ||
Tom V�h�-Salo [email protected] | ||
Trygve Vea [email protected] | ||
dorgonman [email protected] | ||
Gabriel Teles Bastos http://mundorpgmaker.com.br | ||
r-lyeh https://github.com/r-lyeh | ||
Colden Cullen https://github.com/ColdenCullen | ||
Cosku Bas [email protected] | ||
Neil Richardson https://github.com/neilogd | ||
Petri Häkkinen | ||
Omar Cornut | ||
amir ramezani <[email protected]> http://shaberoshan.ir | ||
Luke San Antonio Bialecki [email protected] | ||
Eduardo Doria Lima https://github.com/eduardodoria | ||
Ilya Zhuravlev https://github.com/xyzz | ||
Jussi Sammaltupa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Here's some guidelines on contributing to the SoLoud project. | ||
|
||
- SoLoud is extremely liberally licensed. All submitted code | ||
must follow suit to keep it that way. | ||
(public domain, CC0, wtfpl, zlib/libpng, unlicense, or similar | ||
no-attribution and definitely no viral licenses). | ||
|
||
- When submitting the first time, add your name in AUTHORS. | ||
|
||
- Many small commits are better than few huge ones. | ||
|
||
- Try to follow the coding convention of the surrounding code. | ||
If stand alone (such as platform or output device specific), | ||
this isn't as important. | ||
|
||
- All optimized code (such as SSE or assembler) must be | ||
accompanied by plain 'c' version, because: | ||
a) optimizations come and go, porting 30 years from now | ||
can be really painful. | ||
b) plain 'c' version works as documentation of the | ||
optimized code. | ||
|
||
- When doing platform specific code or otherwise optionally | ||
compiled code, it's often better to have some duplicate | ||
code inside large ifdef block than to have tons of hard | ||
to follow small ifdef blocks. | ||
|
||
- Unless there's a really, really good reason, no templates, | ||
including funkycast<foobar>. foo = (int)bar works fine. | ||
|
||
- Unless performance critical, always try to write for readability. | ||
|
||
Coding convention in brief: | ||
|
||
- On naming: | ||
aFunctionParameter | ||
mMemberVariable | ||
gGlobalVariable | ||
localVariable | ||
CONSTANT_VALUE | ||
ClassName | ||
functionName | ||
|
||
int ExampleClass::example(int aFoo) | ||
{ | ||
if (aFoo) | ||
{ | ||
int i; | ||
for (i = 0; i < mBarCycles; i++) | ||
{ | ||
bar(); | ||
} | ||
switch (gBah) | ||
{ | ||
case BOO: | ||
return HISS; | ||
} | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
SoLoud audio engine | ||
Copyright (c) 2013-2014 Jari Komppa | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
|
||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
|
||
3. This notice may not be removed or altered from any source | ||
distribution. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SoLoud | ||
====== | ||
|
||
SoLoud is an easy to use, free, portable c/c++ audio engine for games. | ||
|
||
![ScreenShot](https://raw.github.com/jarikomppa/soloud/master/soloud.png) | ||
|
||
Zlib/LibPng licensed. Portable. Easy. | ||
|
||
Official site with documentation can be found at: | ||
http://soloud-audio.com |
173 changes: 173 additions & 0 deletions
173
dependenices/soloud-wavstream-loops/demos/3dtest/main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
/* | ||
SoLoud audio engine | ||
Copyright (c) 2013-2015 Jari Komppa | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source | ||
distribution. | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <math.h> | ||
#include <stdio.h> | ||
|
||
#include "imgui.h" | ||
#include "soloud_demo_framework.h" | ||
|
||
#include "soloud.h" | ||
#include "soloud_sfxr.h" | ||
#include "soloud_speech.h" | ||
|
||
SoLoud::Soloud gSoloud; | ||
SoLoud::Sfxr gSfx_mouse, gSfx_orbit; | ||
SoLoud::Speech gSfx_crazy; | ||
|
||
int gSndHandle_mouse = 0; | ||
int gSndHandle_orbit = 0; | ||
int gSndHandle_crazy = 0; | ||
|
||
|
||
int DemoEntry(int argc, char *argv[]) | ||
{ | ||
gSoloud.init(SoLoud::Soloud::CLIP_ROUNDOFF | SoLoud::Soloud::ENABLE_VISUALIZATION); | ||
gSoloud.setGlobalVolume(4); | ||
|
||
gSfx_mouse.loadPreset(SoLoud::Sfxr::LASER, 3); | ||
gSfx_mouse.setLooping(1); | ||
gSfx_mouse.set3dMinMaxDistance(1, 200); | ||
gSfx_mouse.set3dAttenuation(SoLoud::AudioSource::EXPONENTIAL_DISTANCE, 0.5); | ||
gSndHandle_mouse = gSoloud.play3d(gSfx_mouse, 100, 0, 0); | ||
|
||
gSfx_orbit.loadPreset(SoLoud::Sfxr::COIN, 3); | ||
gSfx_orbit.setLooping(1); | ||
gSfx_orbit.set3dMinMaxDistance(1, 200); | ||
gSfx_orbit.set3dAttenuation(SoLoud::AudioSource::EXPONENTIAL_DISTANCE, 0.5); | ||
gSndHandle_orbit = gSoloud.play3d(gSfx_orbit, 50, 0, 0); | ||
|
||
gSfx_crazy.setText("I'm going into space with my space ship space ship space ship spaceeeeeeeeeeeeeeeeeeeeeeeeeeeeee"); | ||
gSfx_crazy.setLooping(1); | ||
gSfx_crazy.set3dMinMaxDistance(1, 400); | ||
gSfx_crazy.set3dAttenuation(SoLoud::AudioSource::EXPONENTIAL_DISTANCE, 0.25); | ||
gSndHandle_crazy = gSoloud.play3d(gSfx_crazy, 50, 0, 0); | ||
return 0; | ||
} | ||
|
||
|
||
bool orbit_enable = 1; | ||
bool crazy_enable = 1; | ||
bool mouse_enable = 1; | ||
|
||
void DemoMainloop() | ||
{ | ||
DemoUpdateStart(); | ||
|
||
gSoloud.setPause(gSndHandle_crazy, !crazy_enable); | ||
gSoloud.setPause(gSndHandle_orbit, !orbit_enable); | ||
gSoloud.setPause(gSndHandle_mouse, !mouse_enable); | ||
|
||
float tick = DemoTick() / 1000.0f; | ||
|
||
float crazyx = (float)(sin(tick) * sin(tick * 0.234) * sin(tick * 4.234) * 150); | ||
float crazyz = (float)(cos(tick) * cos(tick * 0.234) * cos(tick * 4.234) * 150 - 50); | ||
float tickd = tick - 0.1f; | ||
float crazyxv = (float)(sin(tickd) * sin(tickd * 0.234) * sin(tickd * 4.234) * 150); | ||
float crazyzv = (float)(cos(tickd) * cos(tickd * 0.234) * cos(tickd * 4.234) * 150 - 50); | ||
crazyxv = crazyxv - crazyx; | ||
crazyzv = crazyzv - crazyz; | ||
|
||
gSoloud.set3dSourceParameters(gSndHandle_crazy, crazyx, 0, crazyz, crazyxv, 0, crazyzv); | ||
|
||
float orbitx = (float)sin(tick) * 50; | ||
float orbitz = (float)cos(tick) * 50; | ||
float orbitxv = (float)sin(tickd) * 50; | ||
float orbitzv = (float)cos(tickd) * 50; | ||
orbitxv = orbitxv - orbitx; | ||
orbitzv = orbitzv - orbitz; | ||
|
||
gSoloud.set3dSourceParameters(gSndHandle_orbit, orbitx, 0, orbitz, orbitxv, 0, orbitzv); | ||
|
||
float mousex = gMouseX - 400.0f; | ||
float mousez = gMouseY - 200.0f; | ||
|
||
gSoloud.set3dSourcePosition(gSndHandle_mouse, mousex, mousez, 0); | ||
|
||
gSoloud.update3dAudio(); | ||
|
||
DemoTriangle( | ||
5+400, 5+200 - 20, | ||
5+400 - 20, 5+200 + 20, | ||
5+400 + 20, 5+200 + 20, | ||
0x77000000); | ||
DemoTriangle( | ||
400, 200 - 20, | ||
400 - 20, 200 + 20, | ||
400 + 20, 200 + 20, | ||
0xffeeeeee); | ||
|
||
DemoTriangle( | ||
5+400 + orbitx * 2, 5+200 + orbitz * 2 - 10, | ||
5+400 + orbitx * 2 - 10, 5+200 + orbitz * 2 + 10, | ||
5+400 + orbitx * 2 + 10, 5+200 + orbitz * 2 + 10, | ||
0x77000000); | ||
DemoTriangle( | ||
400 + orbitx*2, 200 + orbitz*2-10, | ||
400 + orbitx*2-10, 200 + orbitz*2+10, | ||
400 + orbitx*2+10, 200 + orbitz*2+10, | ||
0xffffff00); | ||
|
||
DemoTriangle( | ||
5 + 400 + crazyx * 2, 5 + 200 + crazyz * 2 - 10, | ||
5 + 400 + crazyx * 2 - 10, 5 + 200 + crazyz * 2 + 10, | ||
5 + 400 + crazyx * 2 + 10, 5 + 200 + crazyz * 2 + 10, | ||
0x77000000); | ||
DemoTriangle( | ||
400 + crazyx * 2, 200 + crazyz * 2 - 10, | ||
400 + crazyx * 2 - 10,200 + crazyz * 2 + 10, | ||
400 + crazyx * 2 + 10,200 + crazyz * 2 + 10, | ||
0xffff00ff); | ||
|
||
DemoTriangle( | ||
5 + 400 + mousex, 5 + 200 + mousez - 10, | ||
5 + 400 + mousex - 10, 5 + 200 + mousez + 10, | ||
5 + 400 + mousex + 10, 5 + 200 + mousez + 10, | ||
0x77000000); | ||
DemoTriangle( | ||
400 + mousex, 200 + mousez - 10, | ||
400 + mousex - 10, 200 + mousez + 10, | ||
400 + mousex + 10, 200 + mousez + 10, | ||
0xff00ffff); | ||
|
||
float *buf = gSoloud.getWave(); | ||
float *fft = gSoloud.calcFFT(); | ||
|
||
ONCE(ImGui::SetNextWindowPos(ImVec2(500, 20))); | ||
ImGui::Begin("Output"); | ||
ImGui::PlotLines("##Wave", buf, 256, 0, "Wave", -1, 1, ImVec2(264, 80)); | ||
ImGui::PlotHistogram("##FFT", fft, 256 / 2, 0, "FFT", 0, 10, ImVec2(264, 80), 8); | ||
ImGui::Text("Active voices : %d", gSoloud.getActiveVoiceCount()); | ||
ImGui::End(); | ||
|
||
ONCE(ImGui::SetNextWindowPos(ImVec2(20, 20))); | ||
ImGui::Begin("Control"); | ||
ImGui::Checkbox("Orbit sound", &orbit_enable); | ||
ImGui::Checkbox("Crazy sound", &crazy_enable); | ||
ImGui::Checkbox("Mouse sound", &mouse_enable); | ||
|
||
ImGui::End(); | ||
DemoUpdateEnd(); | ||
} |
11 changes: 11 additions & 0 deletions
11
dependenices/soloud-wavstream-loops/demos/android/default.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system use, | ||
# "build.properties", and override values to adapt the script to your | ||
# project structure. | ||
|
||
# Project target. | ||
target=android-10 |
Oops, something went wrong.