support for 16 bit native files, part II

git-svn-id: svn://localhost/ardour2/trunk@2134 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-07-16 22:06:35 +00:00
parent 323438965e
commit 37c74810d2
6 changed files with 14 additions and 4 deletions

View file

@ -50,9 +50,9 @@ struct ControlEvent {
coeff[0] = coeff[1] = coeff[2] = coeff[3] = 0.0;
}
double when;
double when;
double value;
double coeff[4]; ///< Used by Curve
double coeff[4]; ///< Used by Curve
};

View file

@ -325,7 +325,8 @@ namespace ARDOUR {
enum SampleFormat {
FormatFloat = 0,
FormatInt24
FormatInt24,
FormatInt16
};

View file

@ -379,7 +379,7 @@ AutomationList::rt_add (double when, double value)
}
}
}
if (!done) {
_rt_insertion_point = _events.insert (where, new ControlEvent (when, value));
}

View file

@ -204,6 +204,7 @@ setup_enum_writer ()
REGISTER_ENUM (FormatFloat);
REGISTER_ENUM (FormatInt24);
REGISTER_ENUM (FormatInt16);
REGISTER (_SampleFormat);
REGISTER_ENUM (BWF);

View file

@ -3599,6 +3599,10 @@ Session::available_capture_duration ()
sample_bytes_on_disk = 3.0;
break;
case FormatInt16:
sample_bytes_on_disk = 2.0;
break;
default:
/* impossible, but keep some gcc versions happy */
fatal << string_compose (_("programming error: %1"),

View file

@ -122,6 +122,10 @@ SndFileSource::SndFileSource (Session& s, ustring path, SampleFormat sfmt, Heade
case FormatInt24:
fmt |= SF_FORMAT_PCM_24;
break;
case FormatInt16:
fmt |= SF_FORMAT_PCM_16;
break;
}
_info.channels = 1;