Skip to content

Commit 7b6ce25

Browse files
committed
remove BufferIndex from interface and align variables names
1 parent 6eaf45f commit 7b6ce25

25 files changed

+362
-362
lines changed

example_interate_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ func Example_iterate() {
1919
signal.WriteStripedInt8([][]int8{{1, 1, 1, 1}, {2, 2, 2, 2}}, buf)
2020

2121
// iterate over buffer interleaved data
22-
for pos := 0; pos < buf.Len(); pos++ {
23-
fmt.Printf("%d", buf.Sample(pos))
22+
for i := 0; i < buf.Len(); i++ {
23+
fmt.Printf("%d", buf.Sample(i))
2424
}
2525

26-
for channel := 0; channel < buf.Channels(); channel++ {
26+
for c := 0; c < buf.Channels(); c++ {
2727
fmt.Println()
28-
for pos := 0; pos < buf.Length(); pos++ {
29-
fmt.Printf("%d", buf.Sample(buf.ChannelPos(channel, pos)))
28+
for i := 0; i < buf.Length(); i++ {
29+
fmt.Printf("%d", buf.Sample(signal.BufferIndex(buf.Channels(), c, i)))
3030
}
3131
}
3232

float32.go

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

float32_test.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

float64.go

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

float64_test.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

int16.go

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)