forked from lexesv/gobass.dll
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptimize.go
More file actions
21 lines (19 loc) · 746 Bytes
/
optimize.go
File metadata and controls
21 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Contains optimized functions which can do multiple things in one CGO call.
package bass
/*
#include "bass.h"
static int _BassOptimizeSetPanVolumePitch(HCHANNEL chan, float pan, float volume, float pitch) {
if(BASS_ChannelSetAttribute(chan, BASS_ATTRIB_PAN, pan)==0) { return BASS_ErrorGetCode(); }
if(BASS_ChannelSetAttribute(chan, BASS_ATTRIB_VOL, volume)==0) { return BASS_ErrorGetCode(); }
if(BASS_ChannelSetAttribute(chan, BASS_ATTRIB_FREQ, pitch)==0) { return BASS_ErrorGetCode(); }
return 0;
}
*/
import "C"
func OptimizeSetPanVolumePitch(self Channel, pan, volume, pitch float64) error {
if C._BassOptimizeSetPanVolumePitch(self.cint(), C.float(pan), C.float(volume), C.float(pitch))==0 {
return nil
} else {
return errMsg()
}
}