- refactoring

This commit is contained in:
2023-04-21 09:59:13 +03:00
parent 7db4c8cb53
commit 76aa7861f5
16 changed files with 329 additions and 171 deletions

View File

@@ -81,7 +81,7 @@ bool WavFileReader::open(const std::tstring& filename)
#ifdef WIN32
mHandle = _wfopen(filename.c_str(), L"rb");
#else
mHandle = fopen(StringHelper::makeUtf8(filename).c_str(), "rb");
mHandle = fopen(strx::makeUtf8(filename).c_str(), "rb");
#endif
if (NULL == mHandle)
{
@@ -287,11 +287,11 @@ bool WavFileWriter::open(const std::tstring& filename, int rate, int channels)
#ifdef WIN32
mHandle = _wfopen(filename.c_str(), L"wb");
#else
mHandle = fopen(StringHelper::makeUtf8(filename).c_str(), "wb");
mHandle = fopen(strx::makeUtf8(filename).c_str(), "wb");
#endif
if (nullptr == mHandle)
{
ICELogError(<< "Failed to create .wav file: filename = " << StringHelper::makeUtf8(filename) << " , error = " << errno);
ICELogError(<< "Failed to create .wav file: filename = " << strx::makeUtf8(filename) << " , error = " << errno);
return false;
}