// Speed sets the motors speed to the specified value
549706
func (m *MotorDriver) Speed(speed int16) error {
	m.syncRoot.Lock()
	defer m.syncRoot.Unlock()
	if m.halted {
		return nil
	}
	m.speedHelper(speed)
	return nil
}
1005216
func (envgen EnvGen) Rate(rate int8) Input {
	CheckRate(rate)
	(&envgen).defaults()
	ins := []Input{
		envgen.Gate,
		envgen.LevelScale,
		envgen.LevelBias,
		envgen.TimeScale,
		C(float32(envgen.Done)),
	}
	ins = append(ins, envgen.Env.Inputs()...)
	return NewInput("EnvGen", rate, 0, 1, ins...)
}
490151
func (h *MMA7660Driver) Acceleration(x, y, z float64) (ax, ay, az float64) {
	return x / 21.0, y / 21.0, z / 21.0
}
265839
func (t *Term) SetSpeed(baud int) error {
	return t.SetOption(Speed(baud))
}
35450
func (g GrainIn) Rate(rate int8) Input {
	CheckRate(rate)
	if g.In == nil {
		panic("GrainIn requires an input signal")
	}
	(&g).defaults()

	in := NewInput("GrainIn", rate, 0, 1, g.Trigger, g.Dur, g.In, g.Pan, g.EnvBuf, g.MaxGrains)
	if g.NumChannels == 1 {
		return in
	}
	mult := make([]Input, g.NumChannels)
	for i := range mult {
		mult[i] = in
	}
	return Multi(mult...)
}
620136
func (l Latch) Rate(rate int8) Input {
	CheckRate(rate)
	if l.In == nil {
		panic("Latch requires an input signal")
	}
	if l.Trig == nil {
		panic("Latch requires an trig signal")
	}
	return NewInput("Latch", rate, 0, 1, l.In, l.Trig)
}
346661
func (h *ADXL345Driver) SetRate(rate byte) (err error) {
	if rate <= ADXL345_RATE_3200HZ {
		return errors.New("not a valid rate")
	}
	h.bwRate.rate = rate & 0x0F
	if _, err := h.connection.Write([]byte{ADXL345_REG_BW_RATE, h.bwRate.toByte()}); err != nil {
		return err
	}
	return
}
172243
func (hasher Hasher) Rate(rate int8) Input {
	CheckRate(rate)
	if hasher.In == nil {
		panic("Hasher requires an input signal")
	}
	return NewInput("Hasher", rate, 0, 1, hasher.In)
}
95898
func (d *Driver) Throttle(speed float32) {
	d.mutex.Lock()
	defer d.mutex.Unlock()
	d.cmd[2] = floatToCmdByte(speed, 0x7e, 0x7e)
	d.cmd[10] = checksum(d.cmd)
}
326054
func (a *SynthesizeScrollGestureArgs) SetSpeed(speed int) *SynthesizeScrollGestureArgs {
	a.Speed = &speed
	return a
}
760709
func (r RunningSum) Rate(rate int8) Input {
	CheckRate(rate)
	if r.In == nil {
		panic("RunningSum requires an input signal")
	}
	(&r).defaults()
	return NewInput("RunningSum", rate, 0, 1, r.In, r.NumSamp)
}
524363
func (b *Driver) Roll(speed uint8, heading uint16) {
	b.packetChannel <- b.craftPacket([]uint8{speed, uint8(heading >> 8), uint8(heading & 0xFF), 0x01}, 0x02, 0x30)
}
1066748
func (t *Timings) Time() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	return t.totalTime
}
540594
func (c *expvarStatsClient) Timing(name string, value time.Duration, rate float64) {
	c.mu.Lock()
	d, _ := c.m.Get(name).(time.Duration)
	c.m.Set(name, d+value)
	c.mu.Unlock()
}
451946
func (v Vibrato) Rate(rate int8) Input {
	CheckRate(rate)
	(&v).defaults()
	return NewInput("Vibrato", rate, 0, 1, v.Freq, v.Speed, v.Depth, v.Delay, v.Onset, v.RateVariation, v.DepthVariation, v.IPhase)
}
251909
func (s *NoiseReducerSpatialFilterSettings) SetSpeed(v int64) *NoiseReducerSpatialFilterSettings {
	s.Speed = &v
	return s
}
479665
func (r Resonz) Rate(rate int8) Input {
	CheckRate(rate)
	(&r).defaults()
	return NewInput("Resonz", rate, 0, 1, r.In, r.Freq, r.BWR)
}