https://github.com/mcraiha/csharp-qoa
C# implementation of QOA (Quite OK Audio Format)
https://github.com/mcraiha/csharp-qoa
csharp dotnet qoa
Last synced: 9 months ago
JSON representation
C# implementation of QOA (Quite OK Audio Format)
- Host: GitHub
- URL: https://github.com/mcraiha/csharp-qoa
- Owner: mcraiha
- License: mit
- Created: 2024-10-20T17:44:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-14T18:51:40.000Z (over 1 year ago)
- Last Synced: 2025-03-12T04:35:42.316Z (over 1 year ago)
- Topics: csharp, dotnet, qoa
- Language: C#
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSharp-QOA
Managed .NET implementation of [QOA](https://github.com/phoboslab/qoa) (Quite OK Audio Format) written in C#
## Build status

## Nuget
[](https://www.nuget.org/packages/LibQOA/)
## Why?
Because I needed this for my personal project
## Content
[src](src) folder contains the actual library source code to do QOA encoding/decoding
[tests](tests) folder contains unit test cases
[clitool](clitool) folder contains command-line tool source code for encoding/decoding QOA files
## How to use?
If you want to decode .qoa file to .wav, then you can use following code
```cs
using QOALib;
QOA qoa = new QOA();
using (FileStream inputStream = File.OpenRead(inputQOAFilename))
{
using (FileStream outputStream = File.Create(outputWAVFilename))
{
qoa.DecodeToWav(inputStream, outputStream);
}
}
```
If you want to encode 16 bit .wav file to .qoa, then you can use following code
```cs
using QOALib;
QOA qoa = new QOA();
using (FileStream inputStream = File.OpenRead(inputWAVFilename))
{
using (FileStream outputStream = File.Create(outputQOAFilename))
{
qoa.EncodeWAVToQOA(inputStream, outputStream);
}
}
```
## License
All the code is licensed under [MIT License](LICENSE) because that is the license QOA uses.
All the audio samples in [tests/samples](tests/samples) folder are under [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/) and they are from [Oculus Audio Pack 1](https://developers.meta.com/horizon/downloads/package/oculus-audio-pack-1/).