refactor: fix all unused parameter / variable warnings

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-21 10:33:08 +03:00
parent a601b98b74
commit 289bfb0605
5 changed files with 13 additions and 15 deletions

View File

@ -245,7 +245,7 @@ func read4klangUnit(r io.Reader, version int) ([]Unit, error) {
}
}
func read4klangENV(vals [15]byte, version int) []Unit {
func read4klangENV(vals [15]byte, _ int) []Unit {
return []Unit{{
Type: "envelope",
Parameters: map[string]int{
@ -273,7 +273,7 @@ func read4klangVCO(vals [15]byte, version int) []Unit {
color, v = int(v[0]), v[1:]
shape, v = int(v[0]), v[1:]
gain, v = int(v[0]), v[1:]
flags, v = int(v[0]), v[1:]
flags, _ = int(v[0]), v[1:]
if flags&0x10 == 0x10 {
lfo = 1
}
@ -318,7 +318,7 @@ func read4klangVCO(vals [15]byte, version int) []Unit {
}}
}
func read4klangVCF(vals [15]byte, version int) []Unit {
func read4klangVCF(vals [15]byte, _ int) []Unit {
flags := vals[2]
var stereo, lowpass, bandpass, highpass, neghighpass int
if flags&0x01 == 0x01 {
@ -352,14 +352,14 @@ func read4klangVCF(vals [15]byte, version int) []Unit {
}
}
func read4klangDST(vals [15]byte, version int) []Unit {
func read4klangDST(vals [15]byte, _ int) []Unit {
return []Unit{
{Type: "distort", Parameters: map[string]int{"drive": int(vals[0]), "stereo": int(vals[2])}},
{Type: "hold", Parameters: map[string]int{"holdfreq": int(vals[1]), "stereo": int(vals[2])}},
}
}
func read4klangDLL(vals [15]byte, version int) []Unit {
func read4klangDLL(vals [15]byte, _ int) []Unit {
var delaytimes []int
var notetracking int
if vals[11] > 0 {
@ -400,7 +400,7 @@ func read4klangDLL(vals [15]byte, version int) []Unit {
}}
}
func read4klangFOP(vals [15]byte, version int) []Unit {
func read4klangFOP(vals [15]byte, _ int) []Unit {
var t string
var stereo int
switch vals[0] {
@ -434,7 +434,7 @@ func read4klangFOP(vals [15]byte, version int) []Unit {
}}
}
func read4klangFST(vals [15]byte, version int) []Unit {
func read4klangFST(vals [15]byte, _ int) []Unit {
sendpop := 0
if vals[1]&0x40 == 0x40 {
sendpop = 1
@ -484,7 +484,7 @@ func fix4klangTargets(instrIndex int, instr Instrument, m _4klangTargetMap) {
}
}
func read4klangPAN(vals [15]byte, version int) []Unit {
func read4klangPAN(vals [15]byte, _ int) []Unit {
return []Unit{{
Type: "pan",
Parameters: map[string]int{
@ -493,7 +493,7 @@ func read4klangPAN(vals [15]byte, version int) []Unit {
}}}
}
func read4klangOUT(vals [15]byte, version int) []Unit {
func read4klangOUT(vals [15]byte, _ int) []Unit {
return []Unit{{
Type: "outaux",
Parameters: map[string]int{
@ -503,7 +503,7 @@ func read4klangOUT(vals [15]byte, version int) []Unit {
}}
}
func read4klangACC(vals [15]byte, version int) []Unit {
func read4klangACC(vals [15]byte, _ int) []Unit {
c := 0
if vals[0] != 0 {
c = 2
@ -514,7 +514,7 @@ func read4klangACC(vals [15]byte, version int) []Unit {
}}
}
func read4klangFLD(vals [15]byte, version int) []Unit {
func read4klangFLD(vals [15]byte, _ int) []Unit {
return []Unit{{
Type: "loadval",
Parameters: map[string]int{"stereo": 0, "value": int(vals[0])},