Minor format check fix

This commit is contained in:
Respirant
2020-12-12 12:51:16 +01:00
parent 2dc317e98e
commit f283f18041
@@ -157,7 +157,7 @@ TEnumAsByte<AudioFormat> URuntimeAudioImporterBPLibrary::GetAudioFormat(const FS
bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePath, TEnumAsByte<AudioFormat> Format, TEnumAsByte<TranscodingStatus>& status, uint64& framesToWrite, int16_t*&pSampleData, uint32& channels, uint32& sampleRate) { bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePath, TEnumAsByte<AudioFormat> Format, TEnumAsByte<TranscodingStatus>& status, uint64& framesToWrite, int16_t*&pSampleData, uint32& channels, uint32& sampleRate) {
switch (Format) switch (Format)
{ {
case MP3: case AudioFormat::MP3:
{ {
drmp3 mp3; drmp3 mp3;
if (!drmp3_init_file(&mp3, filePath, NULL)) { if (!drmp3_init_file(&mp3, filePath, NULL)) {
@@ -174,7 +174,7 @@ bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePa
} }
break; break;
} }
case WAV: case AudioFormat::WAV:
{ {
drwav wav; drwav wav;
if (!drwav_init_file(&wav, filePath, NULL)) { if (!drwav_init_file(&wav, filePath, NULL)) {
@@ -191,7 +191,7 @@ bool URuntimeAudioImporterBPLibrary::TranscodeAudioToWaveData(const char* filePa
} }
break; break;
} }
case FLAC: case AudioFormat::FLAC:
{ {
drflac* pFlac = drflac_open_file(filePath, NULL); drflac* pFlac = drflac_open_file(filePath, NULL);
if (pFlac == NULL) { if (pFlac == NULL) {