• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ outputChannels函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中outputChannels函数的典型用法代码示例。如果您正苦于以下问题:C++ outputChannels函数的具体用法?C++ outputChannels怎么用?C++ outputChannels使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了outputChannels函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: die

int STEREO::init(double p[], int n_args)
{
	nargs = n_args;
	outslots = n_args - MATRIX_PFIELD_OFFSET;
	const float outskip = p[0];
	const float inskip = p[1];
	float dur = p[2];
	if (dur < 0.0)
		dur = -dur - inskip;

	if (n_args <= MATRIX_PFIELD_OFFSET)
		return die("STEREO", "You need at least one channel assignment.");

	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;
	if (rtsetinput(inskip, this) == -1)
		return DONT_SCHEDULE;	// no input

	if (outputChannels() != 2)
		return die("STEREO", "Output must be stereo.");

	initamp(dur, p, 3, 1);
	if (fastUpdate)
		updatePans(p);

	return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:27,代码来源:STEREO.cpp


示例2: framesToRun

int WAVETABLE::run()
{
    const int nframes = framesToRun();
    for (int i = 0; i < nframes; i++) {
        if (--branch <= 0) {
            if (fastUpdate) {
                if (amptable)
                    amp = ampmult * tablei(currentFrame(), amptable, amptabs);
            }
            else
                doupdate();
            branch = getSkip();
        }

        float out[2];
        out[0] = osc->next() * amp;

        if (outputChannels() == 2) {
            out[1] = (1.0 - spread) * out[0];
            out[0] *= spread;
        }

        rtaddout(out);
        increment();
    }
    return framesToRun();
}
开发者ID:eriser,项目名称:RTcmix-1,代码行数:27,代码来源:WAVETABLE.cpp


示例3: framesToRun

int GRANSYNTH::run()
{
   const int frames = framesToRun();
   const int outchans = outputChannels();
   int i;
   for (i = 0; i < frames; i++) {
      if (--_branch <= 0) {
         doupdate();
         _branch = getSkip();
      }

      _stream->prepare();

      float out[outchans];
      if (outchans == 2) {
         out[0] = _stream->lastL() * _amp;
         out[1] = _stream->lastR() * _amp;
      }
      else
         out[0] = _stream->lastL() * _amp;

      rtaddout(out);
      increment();
   }

   return i;
}
开发者ID:eriser,项目名称:rtcmix-android,代码行数:27,代码来源:GRANSYNTH.cpp


示例4: doupdate

int WAVESHAPE::run()
{
	for (int i = 0; i < framesToRun(); i++) {
		if (--branch <= 0) {
			doupdate();
			branch = skip;
		}

		float sig = osc->next();
		float wsig = wshape(sig * index, xferfunc, lenxfer);

		// dc blocking filter
		float osig = a1 * z1;
		z1 = b1 * z1 + wsig;
		osig += a0 * z1;

		float out[2];
		out[0] = osig * amp;

		if (outputChannels() == 2) {
			out[1] = (1.0 - spread) * out[0];
			out[0] *= spread;
		}

		rtaddout(out);
		increment();
	}
	return framesToRun();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:29,代码来源:WAVESHAPE.cpp


示例5: run

int MMESH2D :: run()
{
	int   i;
	float out[2];

	for (i = 0; i < framesToRun(); i++) {
		if (--branch <= 0) {
			double p[10];
			update (p, 10, kAmp | kPan);

			amp = p[2];
			if (amptable)
				amp *= theEnv->next(currentFrame());

			branch = getSkip();
		}

		out[0] = dcblocker->next(theMesh->tick()) * amp;

		if (outputChannels() == 2) {
			out[1] = out[0] * (1.0 - pctleft);
			out[0] *= pctleft;
		}

		rtaddout(out);
		increment();
	}

	return framesToRun();
}
开发者ID:CreativeInquiry,项目名称:RTcmix,代码行数:30,代码来源:MMESH2D.cpp


示例6: run

int MBOWED :: run()
{
    int   i;
    float out[2];

    for (i = 0; i < framesToRun(); i++) {
        if (--branch <= 0) {
            doupdate();
            branch = getSkip();
        }
        if (--vibupdate < 0) { // reset the vibrato freq after each cycle
            float vibfreq = theRand->range(viblo, vibhi);
            theVib->setfreq(vibfreq);
            vibupdate = (int)(SR/vibfreq);
        }

        out[0] = theBow->tick(bowvel) * amp;
        theBow->setFrequency(freqbase + (freqamp * ( (theVib->next()+2.0) * 0.5 )));

        if (outputChannels() == 2) {
            out[1] = out[0] * (1.0 - pctleft);
            out[0] *= pctleft;
        }

        rtaddout(out);
        increment();
    }

    return framesToRun();
}
开发者ID:CLOUDS-Interactive-Documentary,项目名称:RTCmix,代码行数:30,代码来源:MBOWED.cpp


示例7: run

int FREEVERB :: run()
{
   float *inL, *inR, *outL, *outR;

   inL = in;
   inR = inputChannels() > 1 ? in + 1 : in;
   outL = outbuf;
   outR = outputChannels() > 1 ? outbuf + 1 : outbuf;

   int samps = framesToRun() * inputChannels();

   if (currentFrame() < insamps)
      rtgetin(in, this, samps);

   // Scale input signal by amplitude multiplier and setline curve.
   for (int i = 0; i < samps; i += inputChannels()) {
      if (--branch <= 0) {
         double p[11];
         update(p, 11, kRoomSize | kPreDelay | kDamp | kDry | kWet | kWidth);
         if (currentFrame() < insamps) {  // amp is pre-effect
            amp = update(3, insamps);
            if (amparray)
               amp *= tablei(currentFrame(), amparray, amptabs);
         }
         updateRvb(p);
         branch = getSkip();
      }
      if (currentFrame() < insamps) {     // still taking input from file
         in[i] *= amp;
         if (inputChannels() == 2)
            in[i + 1] *= amp;
      }
      else {                              // in ringdown phase
         in[i] = 0.0;
         if (inputChannels() == 2)
            in[i + 1] = 0.0;
      }
      increment();
   }

   // Hand off to Freeverb to do the actual work.
   rvb->processreplace(inL, inR, outL, outR, framesToRun(), inputChannels(),
                                                         outputChannels());

   return framesToRun();
}
开发者ID:CreativeInquiry,项目名称:RTcmix,代码行数:46,代码来源:FREEVERB.cpp


示例8: init

int FMINST::init(double p[], int n_args)
{
	nargs = n_args;
	float outskip = p[0];
	float dur = p[1];

	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;
	if (outputChannels() > 2)
		return die("FMINST", "Can't handle more than 2 output channels.");

	carfreqraw = p[3];
	if (carfreqraw < 15.0)
		carfreq = cpspch(carfreqraw);
	else
		carfreq = carfreqraw;

	modfreqraw = p[4];
	if (modfreqraw < 15.0)
		modfreq = cpspch(modfreqraw);
	else
		modfreq = modfreqraw;

	double *wavetable = NULL;
	int tablelen = 0;
	if (n_args > 8) {      // handle table coming in as optional p8 TablePField
		wavetable = (double *) getPFieldTable(8, &tablelen);
	}
	if (wavetable == NULL) {
		wavetable = floc(WAVET_GEN_SLOT);
		if (wavetable == NULL)
			return die("FMINST", "Either use the wavetable pfield (p8) or make "
                    "an old-style gen function in slot %d.", WAVET_GEN_SLOT);
		tablelen = fsize(WAVET_GEN_SLOT);
	}

	carosc = new Ooscili(SR, carfreq, wavetable, tablelen);
	modosc = new Ooscili(SR, modfreq, wavetable, tablelen);

	if (n_args < 10) {		// no p9 guide PField, must use gen table
		indexenv = floc(INDEX_GEN_SLOT);
		if (indexenv == NULL)
			return die("FMINST", "Either use the index guide pfield (p9) or make "
                    "an old-style gen function in slot %d.", INDEX_GEN_SLOT);
		int len = fsize(INDEX_GEN_SLOT);
		tableset(SR, dur, len, indtabs);
	}

	initamp(dur, p, 2, 1);
	if (fastUpdate) {
		minindex = p[5];
		indexdiff = p[6] - minindex;
		pan = p[7];
	}

	return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:57,代码来源:FMINST.cpp


示例9: framesToRun

int MYINST::run()
{
	// framesToRun() gives the number of sample frames -- 1 sample for each
	// channel -- that we have to write during this scheduler time slice.

	const int samps = framesToRun() * inputChannels();

	// Read <samps> samples from the input file (or audio input device).

	rtgetin(_in, this, samps);

	// Each loop iteration processes 1 sample frame. */

	for (int i = 0; i < samps; i += inputChannels()) {

		// This block updates certain parameters at the control rate -- the
		// rate set by the user with the control_rate() or reset() script
		// functions.  The Instrument base class holds this value as a number
		// of sample frames to skip between updates.  Get this value using
		// getSkip() to reset the <_branch> counter.

		if (--_branch <= 0) {
			doupdate();
			_branch = getSkip();
		}

		// Grab the current input sample, scaled by the amplitude multiplier.

		float insig = _in[i + _inchan] * _amp;

		float out[2];		// Space for only 2 output chans!

		// Just copy it to the output array with no processing.

		out[0] = insig;

		// If we have stereo output, use the pan pfield.

		if (outputChannels() == 2) {
			out[1] = out[0] * (1.0f - _pan);
			out[0] *= _pan;
		}

		// Write this sample frame to the output buffer.

		rtaddout(out);

		// Increment the count of sample frames this instrument has written.

		increment();
	}

	// Return the number of frames we processed.

	return framesToRun();
}
开发者ID:CreativeInquiry,项目名称:RTcmix,代码行数:56,代码来源:MYINST.cpp


示例10: doupdate

int MYINST::init(double p[], int n_args)
{
	_nargs = n_args;		// store this for use in doupdate()

	// Store pfields in variables, to allow for easy pfield renumbering.
	// You should retain the RTcmix numbering convention for the first
	// 4 pfields: outskip, inskip, dur, amp; or, for instruments that 
	// take no input: outskip, dur, amp.

	const float outskip = p[0];
	const float inskip = p[1];
	const float dur = p[2];

	// Here's how to handle an optional pfield.

	_inchan = (n_args > 4) ? int(p[4]) : 0;			// default is chan 0

	// no need to retrieve amp or pan here, because these will be set 
	// before their first use inside of doupdate().

	// Tell scheduler when to start this inst.  If rtsetoutput returns -1 to
	// indicate an error, then return DONT_SCHEDULE.

	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;

	// Test whether the requested number of output channels is right for your
	// instrument.  The die function reports the error; the system decides
	// whether this should exit the program or keep going.

	if (outputChannels() > 2)
		return die("MYINST", "Use mono or stereo output only.");

	// Set file pointer on audio input.  If the input source is real-time or
	// an aux bus, then <inskip> must be zero.  The system will return an
	// an error in this case, which we must pass along.

	if (rtsetinput(inskip, this) == -1)
		return DONT_SCHEDULE;

	// Make sure requested input channel number is valid for this input source.
	// inputChannels() gives the total number of input channels, initialized
	// in rtsetinput.

	if (_inchan >= inputChannels())
		return die("MYINST", "You asked for channel %d of a %d-channel input.",
		                                             _inchan, inputChannels());

	// Return the number of sample frames that we'll write to output, which
	// the base class has already computed in response to our rtsetoutput call
	// above.  nSamps() equals the duration passed to rtsetoutput multiplied
	// by the sampling rate and then rounded to the nearest integer.

	return nSamps();
}
开发者ID:CreativeInquiry,项目名称:RTcmix,代码行数:55,代码来源:MYINST.cpp


示例11: init

int MULTEQ :: init(double p[], int n_args)
{
   nargs = n_args;
   const float ringdur = 0.1;
   float outskip = p[0];
   float inskip = p[1];
   float dur = p[2];

   if (rtsetinput(inskip, this) == -1)
      return DONT_SCHEDULE;
   insamps = (int) (dur * SR + 0.5);

   if (rtsetoutput(outskip, dur + ringdur, this) == -1)
      return DONT_SCHEDULE;

   if (inputChannels() > MAXCHAN)
      return die("MULTEQ",
               "Input and output must have no more than %d channels.", MAXCHAN);
   if (outputChannels() != inputChannels())
      return die("MULTEQ", "Input and output must have same number of "
                           "channels, no more than %d.", MAXCHAN);

   if ((nargs - FIRST_BAND_PF) % BAND_PFS)
      return die("MULTEQ",
                 "For each band, need type, freq, Q, gain and bypass.");

   numbands = 0;
   int band = 0;
   for (int i = FIRST_BAND_PF; i < nargs; i += BAND_PFS, band += MAXCHAN) {
      if (numbands == MAXBAND) {
         warn("MULTEQ", "You can only have %d EQ bands.", MAXBAND);
         break;
      }

      OeqType type = getEQType(true, i);
      if (type == OeqInvalid)
         return die("MULTEQ", "Invalid EQ type string or code.");
      float freq = p[i + 1];
      float Q = p[i + 2];
      float gain = p[i + 3];
      bool bypass = (bool) p[i + 4];

      for (int c = 0; c < inputChannels(); c++) {
         eq[band + c] = new EQBand(SR, type, freq, Q, gain, bypass);
         if (eq[band + c] == NULL)
            return die("MULTEQ", "Can't allocate EQ band.");
      }

      numbands++;
   }

   skip = (int) (SR / (float) resetval);

   return nSamps();
}
开发者ID:eriser,项目名称:rtcmix-android,代码行数:55,代码来源:MULTEQ.cpp


示例12: init

int BROWN::init(double p[], int n_args)
{
	_nargs = n_args;

	const float outskip = p[0];
	const float dur = p[1];
	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;
	if (outputChannels() > 2)
		return die("BROWN", "Use mono or stereo output only.");
	return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:12,代码来源:BROWN.cpp


示例13: doupdate

int PINK::init(double p[], int n_args)
{
	_nargs = n_args;		// store this for use in doupdate()

	const float outskip = p[0];
	const float dur = p[1];
	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;
	if (outputChannels() > 2)
		return die("PINK", "Use mono or stereo output only.");

	return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:13,代码来源:PINK.cpp


示例14: die

int HOLO::init(double p[], int n_args)
{
    /* HOLO: stereo FIR filter to perform crosstalk cancellation
    *
    *  p0 = outsk
    *  p1 = insk
    *  p2 = dur
    *  p3 = amp
    *  p4 = xtalk amp mult
    *
    */

    int i, rvin;

    if (inputChannels() != 2) {
        return die("HOLO", "Input must be stereo.");
    }
    if (outputChannels() != 2) {
        return die("HOLO", "Output must be stereo.");
    }

    rvin = rtsetinput(p[1], this);
    if (rvin == -1) { // no input
        return(DONT_SCHEDULE);
    }
    rvin = rtsetoutput(p[0], p[2], this);
    if (rvin == -1) { // no output
        return(DONT_SCHEDULE);
    }

    ncoefs = nCoeffs;

    for (int n = 0; n < 2; n++) {
        pastsamps[n] = new float[ncoefs + 1];
        pastsamps2[n] = new float[ncoefs + 1];
        for (i = 0; i < ncoefs; i++) {
            pastsamps[n][i] = 0.0;
            pastsamps2[n][i] = 0.0;
        }
    }

    amp = p[3];

    xtalkAmp = (p[4] != 0.0) ? p[4] : 1.0;

    intap = 0;

    skip = (int)(SR / (float) resetval);

    return 0;
}
开发者ID:eriser,项目名称:RTcmix,代码行数:51,代码来源:HOLO.cpp


示例15: die

int GRANSYNTH::init(double p[], int n_args)
{
   _nargs = n_args;
   if (_nargs < 11 || _nargs > 17)
      return die("GRANSYNTH", USAGE_MESSAGE);
   const double outskip = p[0];
   const double dur = p[1];
   const int seed = _nargs > 14 ? int(p[14]) : 0;

   if (rtsetoutput(outskip, dur, this) == -1)
      return DONT_SCHEDULE;

   if (outputChannels() > 2)
      return die("GRANSYNTH", "You can have only mono or stereo output.");
   _stereoOut = (outputChannels() == 2);

   int length;
   double *table = (double *) getPFieldTable(3, &length);
   if (table == NULL)
      return die("GRANSYNTH", "You must create a table containing the "
                              "oscillator waveform.");
   _stream = new SynthGrainStream(SR, table, length, outputChannels(), seed);

   table = (double *) getPFieldTable(4, &length);
   if (table == NULL)
      return die("GRANSYNTH", "You must create a table containing the grain "
                              "envelope.");
   _stream->setGrainEnvelopeTable(table, length);

   if (_nargs > 12) {
      table = (double *) getPFieldTable(12, &length);
      if (table != NULL)
         _stream->setGrainTranspositionCollection(table, length);
   }

   return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:37,代码来源:GRANSYNTH.cpp


示例16: framesToRun

int COMBIT::run()
{
	int samps = framesToRun() * inputChannels();

	if (currentFrame() < insamps)
		rtgetin(in, this, samps);

	for (int i = 0; i < samps; i += inputChannels())  {
		if (--branch <= 0) {
			double p[8];
			update(p, 8);
			amp = p[3];
			if (amptable) {
#ifdef EMBEDDED
				amp *= rtcmix_table(currentFrame(), amptable, tabs);
#else
				amp *= table(currentFrame(), amptable, tabs);
#endif
			}
			if (p[4] != frequency) {
				frequency = p[4];
				delsamps = (int) ((1.0 / frequency) * SR + 0.5);
			}
			if (p[5] != rvbtime) {
				rvbtime = p[5];
				comb->setReverbTime(rvbtime);
			}
			pctleft = p[7];
			branch = skip;
		}

		float insig, out[2];

		if (currentFrame() < insamps)
			insig = in[i + inchan];
		else
			insig = 0.0;
		out[0] = comb->next(insig, delsamps) * amp;
		if (outputChannels() == 2) {
			out[1] = out[0] * (1.0 - pctleft);
			out[0] *= pctleft;
		}

		rtaddout(out);
		increment();
	}

	return framesToRun();
}
开发者ID:jwmatthys,项目名称:RTcmix,代码行数:49,代码来源:COMBIT.cpp


示例17: usage

int WAVY::init(double p[], int n_args)
{
	if (n_args < 9)
		return usage();
	_nargs = n_args;

	const float outskip = p[0];
	const float dur = p[1];

	if (rtsetoutput(outskip, dur, this) == -1)
		return DONT_SCHEDULE;
	if (outputChannels() < 1 || outputChannels() > 2)
		return die("WAVY", "Must have mono or stereo output only.");

	int wavelenA;
	double *wavetabA = (double *) getPFieldTable(6, &wavelenA);
	if (wavetabA == NULL)
		return die("WAVY", "p6 must be wavetable (use maketable)");

	int wavelenB;
	double *wavetabB = (double *) getPFieldTable(7, &wavelenB);
	if (wavetabB == NULL) {
		wavetabB = wavetabA;
		wavelenB = wavelenA;
	}

	_oscilA = new Ooscil(SR, 440.0, wavetabA, wavelenA);
	_oscilB = new Ooscil(SR, 440.0, wavetabB, wavelenB);

	if (setExpression() != 0)
		return DONT_SCHEDULE;

	assert(_fp != NULL || _combiner != NULL);

	return nSamps();
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:36,代码来源:WAVY.cpp


示例18: init

int WAVETABLE::init(double p[], int n_args)
{
    float outskip = p[0];
    float dur = p[1];

    if (rtsetoutput(outskip, dur, this) == -1)
        return DONT_SCHEDULE;
    if (outputChannels() > 2)
        return die("WAVETABLE", "Can't handle more than 2 output channels.");

    initamp(dur, p, 2, AMP_GEN_SLOT);

    freqraw = p[3];
    float freq;
    if (freqraw < 15.0)
        freq = cpspch(freqraw);
    else
        freq = freqraw;

    spread = p[4];

    wavetable = NULL;
    int tablelen = 0;
    if (n_args > 5)		// handle table coming in as optional p5 TablePField
        wavetable = (double *) getPFieldTable(5, &tablelen);
    if (wavetable == NULL) {
        wavetable = floc(WAVET_GEN_SLOT);
        if (wavetable)
            tablelen = fsize(WAVET_GEN_SLOT);
        else {
            rtcmix_advise("WAVETABLE", "No wavetable specified, so using sine wave.");
            tablelen = 1024;
            wavetable = new double [tablelen];
            ownWavetable = true;
            const double twopi = M_PI * 2.0;
            for (int i = 0; i < tablelen; i++)
                wavetable[i] = sin(twopi * ((double) i / tablelen));
        }
    }
    if (tablelen > 32767)
        return die("WAVETABLE", "wavetable must have fewer than 32768 samples.");

    osc = new Ooscili(SR, freq, wavetable, tablelen);

    return nSamps();
}
开发者ID:eriser,项目名称:RTcmix-1,代码行数:46,代码来源:WAVETABLE.cpp


示例19: tablei

int LSFLUTE::run()
{
	for (int i = 0; i < framesToRun(); i++) {
		if (olength1 < length1) olength1++;
		if (olength1 > length1) olength1--;
		if (olength2 < length2) olength2++;
		if (olength2 > length2) olength2--;
		if (--branch <= 0) {
			aamp = tablei(currentFrame(), amparr, amptabs);
			oamp = tablei(currentFrame(), oamparr, oamptabs);
			branch = skip;
		}

		float sig = (rrand() * namp * aamp) + aamp;
		float del1sig = mdelget(del1ptr,olength1,dl1ptr);
		sig = sig + (del1sig * -0.35);
#ifdef MAXMSP
		delput(sig,del2ptr,dl2ptr);
#else
		mdelput(sig,del2ptr,dl2ptr);
#endif

		sig = mdelget(del2ptr,olength2,dl2ptr);
		sig = (sig * sig * sig) - sig;
		sig = (0.4 * sig) + (0.9 * del1sig);

		float out[2];
		out[0] = sig * amp * oamp;
		sig = (dampcoef * sig) + ((1.0 - dampcoef) * oldsig);
		oldsig = sig;
#ifdef MAXMSP
		delput(sig,del1ptr,dl1ptr);
#else
		mdelput(sig,del1ptr,dl1ptr);
#endif

		if (outputChannels() == 2) {
			out[1] = (1.0 - spread) * out[0];
			out[0] *= spread;
		}

		rtaddout(out);
		increment();
	}
	return framesToRun();
}
开发者ID:CreativeInquiry,项目名称:RTcmix,代码行数:46,代码来源:LSFLUTE.cpp


示例20: framesToRun

int WIGGLE::run()
{
   const int nframes = framesToRun();

   for (int i = 0; i < nframes; i++) {
      if (--branch <= 0) {
         doupdate();
         branch = getSkip();
      }

      float mod_sig = 0.0f;
      if (mod_depth != 0.0f) {
         if (depth_type == CarPercent)
            mod_sig = modulator->tick(mod_freq, mod_depth * car_freq);
         else {   // ModIndex
            float mdepth = mod_depth * mod_freq;  // convert mdepth to peak dev.
            mod_sig = modulator->tick(mod_freq, mdepth);
         }
      }
      float car_sig = carrier->tick(car_freq + mod_sig, amp);
#ifdef DEBUG2
      printf("carfreq=%f carsig=%f modsig=%f\n", car_freq, car_sig, mod_sig);
#endif

      float sig = car_sig;
      for (int j = 0; j < nfilts; j++)
         sig = filt[j]->tick(sig);

      if (do_balance)
         sig = balancer->tick(sig, car_sig);

      float out[2];
      if (outputChannels() == 2) {
         out[0] = sig * pan;
         out[1] = sig * (1.0f - pan);
      }
      else
         out[0] = sig;

      rtaddout(out);
      increment();
   }

   return nframes;
}
开发者ID:RTcmix,项目名称:RTcmix,代码行数:45,代码来源:WIGGLE.cpp



注:本文中的outputChannels函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ outputError函数代码示例发布时间:2022-05-30
下一篇:
C++ output函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap