}
void
-BaseStereoPanner::snapshot (jack_nframes_t now)
+BaseStereoPanner::snapshot (nframes_t now)
{
if (_automation.automation_state() == Write || _automation.automation_state() == Touch) {
_automation.rt_add (now, x);
}
void
-BaseStereoPanner::transport_stopped (jack_nframes_t frame)
+BaseStereoPanner::transport_stopped (nframes_t frame)
{
_automation.reposition_for_rt_add (frame);
out << "begin" << endl;
for (AutomationList::const_iterator i = _automation.const_begin(); i != _automation.const_end(); ++i) {
- out << '\t' << (jack_nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
+ out << '\t' << (nframes_t) floor ((*i)->when) << ' ' << (*i)->value << endl;
if (!out) {
error << string_compose (_("error writing pan automation file (%s)"), strerror (errno)) << endmsg;
return -1;
_automation.clear ();
while (in.getline (line, sizeof (line), '\n')) {
- jack_nframes_t when;
+ nframes_t when;
double value;
++linecnt;
}
void
-BaseStereoPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, jack_nframes_t nframes)
+BaseStereoPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, nframes_t nframes)
{
pan_t delta;
Sample* dst;
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
void
EqualPowerStereoPanner::distribute_automated (Sample* src, Sample** obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes,
+ nframes_t start, nframes_t end, nframes_t nframes,
pan_t** buffers)
{
Sample* dst;
const float pan_law_attenuation = -3.0f;
const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f);
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
float panR = buffers[0][n];
float panL = 1 - panR;
dst = obufs[0];
pbuf = buffers[0];
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
dst = obufs[1];
pbuf = buffers[1];
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pbuf[n];
}
}
void
-Multi2dPanner::snapshot (jack_nframes_t now)
+Multi2dPanner::snapshot (nframes_t now)
{
// how?
}
void
-Multi2dPanner::transport_stopped (jack_nframes_t frame)
+Multi2dPanner::transport_stopped (nframes_t frame)
{
//what?
}
}
void
-Multi2dPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, jack_nframes_t nframes)
+Multi2dPanner::distribute (Sample* src, Sample** obufs, gain_t gain_coeff, nframes_t nframes)
{
Sample* dst;
pan_t pan;
/* interpolate over 64 frames or nframes, whichever is smaller */
- jack_nframes_t limit = min ((jack_nframes_t)64, nframes);
- jack_nframes_t n;
+ nframes_t limit = min ((nframes_t)64, nframes);
+ nframes_t n;
delta = -(delta / (float) (limit));
if (pan != 0.0f) {
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n] * pan;
}
} else {
- for (jack_nframes_t n = 0; n < nframes; ++n) {
+ for (nframes_t n = 0; n < nframes; ++n) {
dst[n] += src[n];
}
void
Multi2dPanner::distribute_automated (Sample* src, Sample** obufs,
- jack_nframes_t start, jack_nframes_t end, jack_nframes_t nframes,
+ nframes_t start, nframes_t end, nframes_t nframes,
pan_t** buffers)
{
if (_muted) {
}
void
-Panner::transport_stopped (jack_nframes_t frame)
+Panner::transport_stopped (nframes_t frame)
{
for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
(*i)->transport_stopped (frame);
}
void
-Panner::snapshot (jack_nframes_t now)
+Panner::snapshot (nframes_t now)
{
for (vector<StreamPanner*>::iterator i = begin(); i != end(); ++i) {
(*i)->snapshot (now);
ofstream out (automation_path.c_str());
if (!out) {
- error << string_compose (_("cannot open pan automation file \"%1\" for saving (%s)"), automation_path, strerror (errno))
+ error << string_compose (_("cannot open pan automation file \"%1\" for saving (%2)"), automation_path, strerror (errno))
<< endmsg;
return -1;
}