mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 13:34:34 -04:00
refactor: fix all unused parameter / variable warnings
This commit is contained in:
parent
a601b98b74
commit
289bfb0605
22
4klang.go
22
4klang.go
@ -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])},
|
||||
|
@ -316,7 +316,7 @@ func (m *Model) tracksWithSameInstrument(trackIndex int) iter.Seq[int] {
|
||||
|
||||
func (m *Model) calcPatternUseCounts(track sointu.Track) []int {
|
||||
result := make([]int, len(m.d.Song.Score.Tracks))
|
||||
for j, _ := range result {
|
||||
for j := range result {
|
||||
result[j] = 0
|
||||
}
|
||||
for j := 0; j < m.d.Song.Score.Length; j++ {
|
||||
|
@ -206,7 +206,7 @@ func (b *Clickable) Update(gtx layout.Context) (widget.Click, bool) {
|
||||
return b.update(b, gtx)
|
||||
}
|
||||
|
||||
func (b *Clickable) update(t event.Tag, gtx layout.Context) (widget.Click, bool) {
|
||||
func (b *Clickable) update(_ event.Tag, gtx layout.Context) (widget.Click, bool) {
|
||||
for len(b.history) > 0 {
|
||||
c := b.history[0]
|
||||
if c.End.IsZero() || gtx.Now.Sub(c.End) < 1*time.Second {
|
||||
|
@ -37,7 +37,6 @@ type ScrollTableStyle struct {
|
||||
ColumnTitleHeight unit.Dp
|
||||
CellWidth unit.Dp
|
||||
CellHeight unit.Dp
|
||||
element func(gtx C, x, y int) D
|
||||
}
|
||||
|
||||
func NewScrollTable(table tracker.Table, vertList, horizList tracker.List) *ScrollTable {
|
||||
|
@ -51,7 +51,6 @@ type (
|
||||
filePathString tracker.String
|
||||
noteEvents []tracker.NoteEvent
|
||||
|
||||
execChan chan func()
|
||||
preferences Preferences
|
||||
|
||||
*tracker.Model
|
||||
|
Reference in New Issue
Block a user