summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-01 16:50:12 +0000
committerDavid Robillard <d@drobilla.net>2011-06-01 16:50:12 +0000
commita473d630eb165272992e90f8d854b1d66ec0be63 (patch)
treed0d027d4e53cb3883f4098c4736651d0ae89c19a /libs/ardour/sndfilesource.cc
parenta46cea06e29bfdb18e0199a665caf5a34d388968 (diff)
Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 8fad3b3705..7006c6c7eb 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -143,7 +143,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig
_info.channels = 1;
_info.samplerate = rate;
_info.format = fmt;
-
+
/* do not open the file here - do that in write_unlocked() as needed
*/
}
@@ -183,7 +183,7 @@ SndFileSource::open ()
_descriptor = new SndFileDescriptor (_path, writable(), &_info);
_descriptor->Closed.connect_same_thread (file_manager_connection, boost::bind (&SndFileSource::file_closed, this));
SNDFILE* sf = _descriptor->allocate ();
-
+
if (sf == 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
@@ -227,16 +227,16 @@ SndFileSource::open ()
if (writable()) {
sf_command (sf, SFC_SET_UPDATE_HEADER_AUTO, 0, SF_FALSE);
-
+
if (_flags & Broadcast) {
-
+
if (!_broadcast_info) {
_broadcast_info = new BroadcastInfo;
}
-
+
_broadcast_info->set_from_session (_session, header_position_offset);
_broadcast_info->set_description (string_compose ("BWF %1", _name));
-
+
if (!_broadcast_info->write_to_file (sf)) {
error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"),
_path, _broadcast_info->get_error())
@@ -526,7 +526,7 @@ SndFileSource::flush_header ()
error << string_compose (_("could not allocate file %1 to write header"), _path) << endmsg;
return -1;
}
-
+
int const r = sf_command (sf, SFC_UPDATE_HEADER_NOW, 0, 0) != SF_TRUE;
_descriptor->release ();
@@ -582,7 +582,7 @@ SndFileSource::set_header_timeline_position ()
_broadcast_info->set_time_reference (_timeline_position);
SNDFILE* sf = _descriptor->allocate ();
-
+
if (sf == 0 || !_broadcast_info->write_to_file (sf)) {
error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"),
_path, _broadcast_info->get_error())
@@ -599,7 +599,7 @@ framecnt_t
SndFileSource::write_float (Sample* data, framepos_t frame_pos, framecnt_t cnt)
{
SNDFILE* sf = _descriptor->allocate ();
-
+
if (sf == 0 || sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) < 0) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
@@ -770,7 +770,7 @@ SndFileSource::crossfade (Sample* data, framecnt_t cnt, int fade_in)
for (framecnt_t n = 0; n < xfade; ++n) {
xfade_buf[n] = (xfade_buf[n] * out[n]) + (fade_data[n] * in[n]);
}
-
+
} else if (xfade) {
/* long xfade length, has to be computed across several calls */
@@ -866,10 +866,10 @@ SndFileSource::get_soundfile_info (const string& path, SoundFileInfo& info, stri
info.samplerate = sf_info.samplerate;
info.channels = sf_info.channels;
info.length = sf_info.frames;
-
+
string major = sndfile_major_format(sf_info.format);
string minor = sndfile_minor_format(sf_info.format);
-
+
if (major.length() + minor.length() < 16) { /* arbitrary */
info.format_name = string_compose("%1/%2", major, minor);
} else {
@@ -906,7 +906,7 @@ SndFileSource::file_closed ()
to make sure its time is as new as the audio
file.
*/
-
+
touch_peakfile ();
}