Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bass.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ package bass
import "C"

import (
"errors"
"fmt"
"strconv"
"unsafe"
"errors"
)

/*
Expand Down Expand Up @@ -271,6 +271,14 @@ func RecordStart(freq int, chans int, flags int, proc RecordCallback) (int, erro
return 0, errMsg(int(C.BASS_ErrorGetCode()))
}
}
//ChannelGetInfo get channel info from the header
func ChannelGetInfo(ch int) (C.BASS_CHANNELINFO, ERROR){
var chInfo C.BASS_CHANNELINFO
if C.BASS_ChannelGetInfo(C.DWORD(ch), &chInfo) !=0 {
return chInfo, nil
}
return chInfo, errMsg(int(C.BASS_ErrorGetCode()))
}

//typedef BOOL (CALLBACK RECORDPROC)(HRECORD handle, const void *buffer, DWORD length, void *user);
type RecordCallback = func(handle C.HRECORD, buffer *C.char, length C.DWORD, user *C.char) bool
Expand Down