func NewOneProc(f OneProcFunc) *OneProc {
	return &OneProc{f: f}
}
NewOneProc creates a new Proc.
package dsp
import (
	"bytes"
	"errors"
	"fmt"
	"reflect"
	"strings"
)
var ErrNoFunc = errors.New("no ProcFunc set")
var ErrOOB = errors.New("frame index out of bounds")
type Value interface {
}
type Processer interface {
}
type Framer interface {
	Get(int) (Value, error)
}
type OneValuer interface {
	Get() (Value, error)
}
type Inputter interface {
	SetInputs(...Processer)
}
type Resetter interface {
	Reset()
}
type ProcFunc func(int, ...Processer) (Value, error)
type Proc struct {
	f      ProcFunc
	inputs []Processer
	cache  *cache
}
func NewProc(bufSize int, f ProcFunc) *Proc {
	return &Proc{
		f:     f,
		cache: newCache(bufSize),
	}
}
func (bp *Proc) SetInputs(inputs ...Processer) {
	bp.inputs = inputs
}
func (bp *Proc) Reset() {
	bp.cache.clear()
}
func (bp *Proc) Get(idx int) (Value, error) {
	if idx < 0 {
		return nil, ErrOOB
	}
	val, ok := bp.cache.get(idx)
	if ok {
		return val, nil
	}
	if bp.f != nil {
		v, e := bp.f(idx, bp.inputs...)
		if e != nil {
			return nil, e
		}
		bp.cache.set(idx, v)
		return v, nil
	}
	return nil, ErrNoFunc
}
func (bp *Proc) SetCache(idx int, val Value) {
	bp.cache.set(idx, val)
}
func (bp *Proc) GetCache(idx int) (Value, bool) {
	val, ok := bp.cache.get(idx)
	return val, ok
}
func (bp *Proc) ClearCache() {
	bp.cache.clear()
}
func (bp *Proc) Inputs() []Processer {
	return bp.inputs
}
func (bp *Proc) Framer(n int) Framer {
	return bp.inputs[n].(Framer)
}
func (bp *Proc) OneValuer(n int) OneValuer {
	return bp.inputs[n].(OneValuer)
}
type OneProcFunc func(...Processer) (Value, error)
type OneProc struct {
	f      OneProcFunc
	inputs []Processer
	cache  Value
}