summaryrefslogtreecommitdiff
path: root/libs/ardour/audiofilesource.cc
diff options
context:
space:
mode:
authorMathias Buhr <napcode@apparatus.de>2015-08-29 13:45:43 +0200
committerMathias Buhr <mathias.buhr@citrix.com>2015-09-03 09:54:23 +0200
commit95b144ee583e49d8532749a1e820f93c5f701381 (patch)
treeba6cbbb1ddea23b71a94a8326b5d00f68b8a0cf8 /libs/ardour/audiofilesource.cc
parent30af404def27675c8e85cea2e50db76c054af276 (diff)
Use const reference and renames variable
Diffstat (limited to 'libs/ardour/audiofilesource.cc')
-rw-r--r--libs/ardour/audiofilesource.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 19434bd145..0fd7ec9ec3 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -153,7 +153,7 @@ AudioFileSource::~AudioFileSource ()
DEBUG_TRACE (DEBUG::Destruction, string_compose ("AudioFileSource destructor %1, removable? %2\n", _path, removable()));
if (removable()) {
::g_unlink (_path.c_str());
- ::g_unlink (peakpath.c_str());
+ ::g_unlink (_peakpath.c_str());
}
}
@@ -164,7 +164,7 @@ AudioFileSource::init (const string& pathstr, bool must_exist)
}
string
-AudioFileSource::peak_path (string audio_path)
+AudioFileSource::generate_peak_path (const string& audio_path)
{
string base;
@@ -187,7 +187,7 @@ AudioFileSource::peak_path (string audio_path)
}
string
-AudioFileSource::find_broken_peakfile (string peak_path, string audio_path)
+AudioFileSource::find_broken_peakfile (const string& peak_path, const string& audio_path)
{
string str;
@@ -203,7 +203,7 @@ AudioFileSource::find_broken_peakfile (string peak_path, string audio_path)
the bug means that we can't reliably use it.
*/
- peak_path = str;
+ return str;
} else {
/* all native files are mono, so we can just rename
@@ -219,7 +219,7 @@ AudioFileSource::find_broken_peakfile (string peak_path, string audio_path)
#ifndef PLATFORM_WINDOWS // there's no old_peak_path() for windows
str = old_peak_path (audio_path);
if (Glib::file_test (str, Glib::FILE_TEST_EXISTS)) {
- peak_path = str;
+ return str;
}
#endif
}
@@ -228,13 +228,13 @@ AudioFileSource::find_broken_peakfile (string peak_path, string audio_path)
}
string
-AudioFileSource::broken_peak_path (string audio_path)
+AudioFileSource::broken_peak_path (const string& audio_path)
{
return _session.peak_path (basename_nosuffix (audio_path));
}
string
-AudioFileSource::old_peak_path (string audio_path)
+AudioFileSource::old_peak_path (const string& audio_path)
{
/* XXX hardly bombproof! fix me */
@@ -264,7 +264,7 @@ AudioFileSource::old_peak_path (string audio_path)
}
bool
-AudioFileSource::get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg)
+AudioFileSource::get_soundfile_info (const string& path, SoundFileInfo& _info, string& error_msg)
{
/* try sndfile first because it gets timecode info from .wav (BWF) if it exists,
which at present, ExtAudioFile from Apple seems unable to do.
@@ -325,7 +325,7 @@ AudioFileSource::mark_streaming_write_completed (const Lock& lock)
int
AudioFileSource::move_dependents_to_trash()
{
- return ::g_unlink (peakpath.c_str());
+ return ::g_unlink (_peakpath.c_str());
}
void