summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-02-04 20:27:47 +0100
committerRay <[email protected]>2023-02-04 20:27:47 +0100
commit589892af07e8ee7392f9ab7b8c9bb0f8263c4e48 (patch)
tree542a24eee4717e8e12d78756ea8bedb1df332fd4 /src
parent901c4553d2b9c23337f10083f6726cdd71927cf5 (diff)
downloadraylib-589892af07e8ee7392f9ab7b8c9bb0f8263c4e48.tar.gz
raylib-589892af07e8ee7392f9ab7b8c9bb0f8263c4e48.zip
Support QOA audio format on `ExportWave()` -WIP-
Diffstat (limited to 'src')
-rw-r--r--src/raudio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/raudio.c b/src/raudio.c
index 90de7fe9..c66a99c1 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -986,6 +986,18 @@ bool ExportWave(Wave wave, const char *fileName)
drwav_free(fileData, NULL);
}
#endif
+#if defined(SUPPORT_FILEFORMAT_QOA)
+ else if (IsFileExtension(fileName, ".qoa"))
+ {
+ qoa_desc qoa = { 0 };
+ qoa.channels = wave.channels;
+ qoa.samplerate = wave.sampleRate;
+ qoa.samples = wave.frameCount;
+
+ // TODO: Review wave.data format required for export
+ success = qoa_write(fileName, wave.data, &qoa);
+ }
+#endif
else if (IsFileExtension(fileName, ".raw"))
{
// Export raw sample data (without header)