Beispiel #1
0
// FMOD_RESULT F_API FMOD_ChannelGroup_AddDSP           (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP *dsp, FMOD_DSPCONNECTION **connection);
func (cg *ChannelGroup) AddDSP(dsp *Dsp) (*DspConn, error) {
	var ferr C.FMOD_RESULT
	var conn DspConn
	base.Thread(func() {
		ferr = C.FMOD_ChannelGroup_AddDSP(cg.group, dsp.dsp, &conn.conn)
	})
	err := base.ResultToError(ferr)
	if err != nil {
		return nil, err
	}
	return &conn, nil
}
Beispiel #2
0
// Add a pre-created DSP unit to the specified index in the DSP chain.
func (c *ChannelGroup) AddDSP(index int, dsp DSP) error {
	res := C.FMOD_ChannelGroup_AddDSP(c.cptr, C.int(index), dsp.cptr)
	return errs[res]
}