REVIEWED: QOA audio file export
This commit is contained in:
parent
ab14ad5d75
commit
9614d3353b
1 changed files with 10 additions and 6 deletions
|
@ -1002,14 +1002,18 @@ bool ExportWave(Wave wave, const char *fileName)
|
|||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_QOA)
|
||||
else if (IsFileExtension(fileName, ".qoa"))
|
||||
{
|
||||
if (wave.sampleSize == 16)
|
||||
{
|
||||
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);
|
||||
int bytesWritten = qoa_write(fileName, wave.data, &qoa);
|
||||
if (bytesWritten > 0) success = true;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "AUDIO: Wave data must be 16 bit per sample for QOA format export");
|
||||
}
|
||||
#endif
|
||||
else if (IsFileExtension(fileName, ".raw"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue