Skip to content

Commit

Permalink
Merge pull request #271 from Jbleezy/main
Browse files Browse the repository at this point in the history
Fix guess sound filename function
  • Loading branch information
Laupetin authored Sep 23, 2024
2 parents 042c68a + d558a4e commit fabefc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ObjLoading/ObjContainer/SoundBank/SoundBankWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ class SoundBankWriterImpl : public SoundBankWriter

bool GuessFilenameAndLoadFile(const std::string& filePath, const SoundBankEntryInfo& sound, std::unique_ptr<char[]>& soundData, size_t& soundSize)
{
fs::path pathWithExtension = fs::path(filePath).replace_extension(".wav");
fs::path pathWithExtension = fs::path(filePath).concat(".wav");
auto file = m_asset_search_path->Open(pathWithExtension.string());
if (file.IsOpen())
return LoadWavFile(file, sound, soundData, soundSize);

pathWithExtension = fs::path(filePath).replace_extension(".flac");
pathWithExtension = fs::path(filePath).concat(".flac");
file = m_asset_search_path->Open(pathWithExtension.string());
if (file.IsOpen())
return LoadFlacFile(file, pathWithExtension.string(), sound, soundData, soundSize);
Expand Down

0 comments on commit fabefc8

Please sign in to comment.