Skip to content

Commit 0623bb4

Browse files
committed
chore: update microphone driver to use latest i2s interface
Signed-off-by: deadprogram <ron@hybridgroup.com>
1 parent 019bbbe commit 0623bb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

microphone/microphone.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (d *Device) Read(r []int32) (int, error) {
6464
count := len(r)
6565

6666
// get the next group of samples
67-
machine.I2S0.Read(d.buf)
67+
machine.I2S0.ReadStereo(d.buf)
6868

6969
if len(r) > len(d.buf) {
7070
count = len(d.buf)
@@ -83,7 +83,7 @@ func (d *Device) ReadWithFilter(r []int32) (int, error) {
8383
for i := 0; i < len(r); i++ {
8484

8585
// get the next group of samples
86-
machine.I2S0.Read(d.buf)
86+
machine.I2S0.ReadStereo(d.buf)
8787

8888
// filter
8989
sum = applySincFilter(d.buf)

0 commit comments

Comments
 (0)