summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/WaveFile.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-03-15 00:57:56 +0100
committerPierre Bourdon <delroth@gmail.com>2014-03-15 00:57:56 +0100
commit8d679e76d299956a1521bc14502466be8d8b2df8 (patch)
tree97db9ad6a45a8e5d711d7763199579e400a65bc8 /Source/Core/AudioCommon/WaveFile.cpp
parent12c2e345a35a571aadc842e30c38b3b4d8f70dce (diff)
parenta82675b7d581421fa80d5d5c53253cf1d5c1a26d (diff)
Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
-rw-r--r--Source/Core/AudioCommon/WaveFile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp
index facf59a79a..a9f1e2ca08 100644
--- a/Source/Core/AudioCommon/WaveFile.cpp
+++ b/Source/Core/AudioCommon/WaveFile.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include <string>
+
#include "AudioCommon/WaveFile.h"
#include "Common/Common.h"
#include "Core/ConfigManager.h"
@@ -21,7 +23,7 @@ WaveFileWriter::~WaveFileWriter()
Stop();
}
-bool WaveFileWriter::Start(const char *filename, unsigned int HLESampleRate)
+bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRate)
{
if (!conv_buffer)
conv_buffer = new short[BUF_SIZE];
@@ -29,14 +31,14 @@ bool WaveFileWriter::Start(const char *filename, unsigned int HLESampleRate)
// Check if the file is already open
if (file)
{
- PanicAlertT("The file %s was already open, the file header will not be written.", filename);
+ PanicAlertT("The file %s was already open, the file header will not be written.", filename.c_str());
return false;
}
file.Open(filename, "wb");
if (!file)
{
- PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename);
+ PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename.c_str());
return false;
}