Skip to content

Commit fc64e96

Browse files
committed
Callback correct sample count
1 parent ab7a804 commit fc64e96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sam_arduino_out.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class SAMOutputCallback : public SAMOutputBase {
8181

8282
virtual bool write(byte *buffer, int bytes_count) {
8383
SAM_LOG("SAMOutputCallback::write: %d", bytes_count);
84-
int size = bytes_count;
85-
callback(size, (int16_t *)buffer);
84+
int samples = bytes_count / sizeof(int16_t);
85+
callback(samples, (int16_t *)buffer);
8686
return true;
8787
}
8888

0 commit comments

Comments
 (0)