Do u kno da wae
- C 85.7%
- C++ 13.1%
- CMake 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| cmake | ||
| resources | ||
| src | ||
| test | ||
| .gitignore | ||
| CMakeLists.txt | ||
| logo.png | ||
| README.md | ||
DA WAE
Do u kno da wae
DA WAE stands for Definitely and Absolutely the Worst Audio Engine
It is absolutely the worst audio engine known to man kind
How to use DAWAE in your project
First step: figure out how youre gonna get includes going (#include <dawae/audio.hpp>)
Code example:
#include <fmt/base.h>
#include <dawae/audio.hpp>
#include <memory>
int main() {
fmt::print("[DAWAE] hi this is the DAWAE audio engine and hi\n");
auto dawae = std::make_unique<dawae::AudioEngine>();
auto soundmp3 = dawae->mp3("../resources/file.mp3"); // for mp3
auto soundwav = dawae->wav("../resources/file.wav"); // for wav
auto soundogg = dawae->ogg("../resources/file.ogg"); // for ogg
dawae->volume(0.5f);
dawae->play(...);
fmt::print("[DAWAE] ok bye im deleting myself\n");
}
CMake Usage
- Using FetchContent:
include(FetchContent)
FetchContent_Declare(
dawae
GIT_REPOSITORY https://forgejo.hlelo.cc/Miskaa/DAWAE
GIT_TAG v0.1.0
)
FetchContent_MakeAvailable(dawae)
add_executable(myapp src/main.cpp)
target_link_libraries(myapp PRIVATE dawae::dawa)
Warning: fmt will be added automatically
For looping sounds (for eg. a main menu) do this:
#include <fmt/base.h>
#include <dawae/audio.hpp>
#include <memory>
#include <cmath>
int main() {
/* ... */
/* probably put this in some sort of function or something, not main */
auto menuMusic = dawae->ogg("menu.ogg");
auto handle = dawae->play(menuMusic, true);
/* ... */
/* when exiting said main menu */
dawae->stop(handle);
}
DAWAE also uses FMT, minimp3.h, and stb_vorbis.c
Formats supported:
- WAV
- MP3
- OGG
Credits
- prevter: icon and name
Why?
Yes.
i may or may not stolen some code from a FMOD decomp because i cant make a audio engine myself