/
bassinterface_amd64.go
37 lines (29 loc) · 1.05 KB
/
bassinterface_amd64.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package bass
import "github.com/ying32/govcl/vcl/dylib/floatpatch"
func ToUInt64(r1, r2 uintptr) uint64 {
return uint64(r1)
}
//func ToUInt64(r1, r2 uintptr) uint64 {
// ret := uint64(r2)
// ret = uint64(ret<<32) + uint64(r1)
// return ret
//}
//func UInt64To(val uint64) (uintptr, uintptr) {
// return uintptr(val), 0
//}
func BASS_StreamCreateFile(mem bool, file string, offset, length uint64, flags uint32) HSTREAM {
r, _, _ := _BASS_StreamCreateFile.Call(cbool(mem), cstr(file), uintptr(offset), uintptr(length), uintptr(flags))
return HSTREAM(r)
}
func BASS_ChannelSetPosition(handle HSTREAM, pos uint64, mode uint32) bool {
r, _, _ := _BASS_ChannelSetPosition.Call(uintptr(handle), uintptr(pos), uintptr(mode))
return r != 0
}
func BASS_ChannelBytes2Seconds(handle HSTREAM, pos uint64) float64 {
_BASS_ChannelBytes2Seconds.Call(uintptr(handle), uintptr(pos))
return floatpatch.Getfloat64()
}
func BASS_ChannelSeconds2Bytes(handle HSTREAM, pos float64) uint64 {
r, _, _ := _BASS_ChannelSeconds2Bytes.Call(uintptr(handle), uintptr(pos))
return uint64(r)
}