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:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -325,7 +325,8 @@ namespace ARDOUR {
|
||||
|
||||
enum SampleFormat {
|
||||
FormatFloat = 0,
|
||||
FormatInt24
|
||||
FormatInt24,
|
||||
FormatInt16
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ AutomationList::rt_add (double when, double value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!done) {
|
||||
_rt_insertion_point = _events.insert (where, new ControlEvent (when, value));
|
||||
}
|
||||
|
||||
@@ -204,6 +204,7 @@ setup_enum_writer ()
|
||||
|
||||
REGISTER_ENUM (FormatFloat);
|
||||
REGISTER_ENUM (FormatInt24);
|
||||
REGISTER_ENUM (FormatInt16);
|
||||
REGISTER (_SampleFormat);
|
||||
|
||||
REGISTER_ENUM (BWF);
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user