Skip to content
Snippets Groups Projects
Commit 0943e0bd authored by Tristan Matthews's avatar Tristan Matthews
Browse files

audiorecord: cleanup

parent b3ca5f64
Branches
Tags
No related merge requests found
...@@ -130,7 +130,6 @@ void AudioRecord::setSndSamplingRate(int smplRate) ...@@ -130,7 +130,6 @@ void AudioRecord::setSndSamplingRate(int smplRate)
void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std::string &path) void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std::string &path)
{ {
std::stringstream s;
std::string filePath; std::string filePath;
// use HOME directory if path is empty, or if path does not exist // use HOME directory if path is empty, or if path does not exist
...@@ -143,7 +142,7 @@ void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std: ...@@ -143,7 +142,7 @@ void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std:
fileType_ = type; fileType_ = type;
channels_ = 1; channels_ = 1;
sndSmplRate_ = sndSmplRate; sndSmplRate_ = sndSmplRate;
savePath_ = (*filePath.rbegin() == '/') ? filePath : filePath + "/"; savePath_ = (*filePath.rbegin() == DIR_SEPARATOR_CH) ? filePath : filePath + DIR_SEPARATOR_STR;
} }
namespace { namespace {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define DIR_SEPARATOR_STR "/" // Directory separator char #define DIR_SEPARATOR_STR "/" // Directory separator char
#define DIR_SEPARATOR_CH = '/' // Directory separator string #define DIR_SEPARATOR_CH '/' // Directory separator string
namespace fileutils { namespace fileutils {
std::string get_home_dir(); std::string get_home_dir();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment