diff options
| author | Jeff Epler <jepler@gmail.com> | 2019-12-12 08:44:15 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2019-12-12 08:44:15 -0600 |
| commit | 1cdac3f16a9244c992e8494a7246ab643cdb47c0 (patch) | |
| tree | bc50ab0a7659defa75b867027330192c802fd1c5 /supervisor | |
| parent | 8c841af9461eba6252690c38bc3e726f2fd09e8b (diff) | |
MP3File: Fix stereo playback on samd AudioOut
There were several problems with the way this worked -- the read_count
approach was too complicated and I made a mistake "simplifying" it from
WaveFile. And when the right channel was returned, it was off by 1 byte,
making it into static.
Instead, directly track which is the "other" channel that has data
available, and by using the right data type make the "+ channel"
arithmetic give the right result.
This requires a double cast (int16_t*)(void*) due to an alignment warning;
the alignment is now ensured manually, but the compiler doesn't make the
necessary inference that the low address bit must be clear.
Diffstat (limited to 'supervisor')
0 files changed, 0 insertions, 0 deletions
