Skip to content

Commit

Permalink
Fix issue where left/right audio channels were swapped
Browse files Browse the repository at this point in the history
  • Loading branch information
nullobject authored and phoracek committed Jan 15, 2024
1 parent a112c9e commit b0ad075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ backwards compatibility.
## Unreleased

* Allow audio sampling rate of 96 kHz.
* **Breaking** Fix issue where left/right audio channels were swapped

## 0.8.0

Expand Down
4 changes: 2 additions & 2 deletions src/audio/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl Interface {

let y0 = u24_to_f32(rx_y0);
let y1 = u24_to_f32(rx_y1);
block[block_index] = (y1, y0);
block[block_index] = (y0, y1);

dma_index += 2;
block_index += 1;
Expand All @@ -136,7 +136,7 @@ impl Interface {
let tx0: usize = dma_index + skip.0;
let tx1: usize = tx0 + 1;

let (y0, y1) = block[block_index];
let (y1, y0) = block[block_index];
unsafe { TX_BUFFER[tx0] = f32_to_u24(y0) };
unsafe { TX_BUFFER[tx1] = f32_to_u24(y1) };

Expand Down

0 comments on commit b0ad075

Please sign in to comment.