Files
ReMixer/README.md

92 lines
2.4 KiB
Markdown

# ReMixer - A C++ Sound Library
![](https://img.shields.io/badge/Redacted-Software-black)
![Static Badge](https://img.shields.io/badge/Lit-Based-%20)
![C++](https://img.shields.io/badge/C%2B%2B-20-blue)
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue)](http://unlicense.org/)
ReMixer is a cross-platform audio library for C++ that supports sound playback, recording, and mixing. It provides a unified API for working with various audio backends, making it easier to develop audio applications without worrying about platform-specific details.
## Features
* Cross-Platform - A single API covers them all!
* Windows
* WASAPI Backend - On The Roadmap
* Linux
* PulseAudio Backend - In Prorgress, Does Work.
* C++20
* Sound Playback, Recording, and Mixing.
* Supports OGG Vorbis, and raw PCM binary sound files.
## Dependencies
* PulseAudio Libraries
* Fedora: `dnf install pulseaudio-libs-devel`
* Vorbis Library
* Fedora: `dnf install libvorbis-devel`
## Supported Compilers
* GCC 14.2
## Installation
## Basic Usage
Here's a simple example demonstrating how to use the ReMixer library for audio playback:
```cpp
#include "ReMixer.h"
#include <chrono>
int main() {
using namespace ReMixer;
using namespace std::chrono_literals;
// Set the sample rate
uint measurement = 44.1_kHz;
// Create an instance of PulseAudioSubsystem
PulseAudioSubsystem test = PulseAudioSubsystem("PulseAudio Test");
// Create audio streams
PulseStream test_stream = test.CreateStream("Test Stream");
PulseStream test_stream2 = test.CreateStream("Another Test Stream");
// Load audio files
Sound test_sound = Sound::FromPCMFile("output.raw");
Sound ogg_test_sound = Sound::FromOGGVorbisFile("song.ogg");
// Play audio
test.Play(test_stream, test_sound);
//test.Play(test_stream2, ogg_test_sound);
// Keep the application running
while (true) {
// std::this_thread::sleep_for(25ms);
}
return 0;
}
```
## Examples
For more advanced usage and examples, refer to the examples directory in the repository.
## Documentation
Documentation is automatically generated for the latest commit, and is hosted at https://doc.redacted.cc/ReMixer .
## Contributing
You know the drill, send those pull requests.
## License
ReMixer is expressly licensed to the Public Domain. See the LICENSE file for details.
## Acknowledgements
ReMixer is developed and maintained by the boys from Redacted Software.