# Stereo / two channel audio

**URL:** <https://forum.makecode.com/t/stereo-two-channel-audio/416>\
**Category:** Arcade\
**Created:** [August 8, 2019, 6:12pm UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416 "2019-08-08T18:12:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)\
**Post date:** [August 8, 2019, 6:12pm UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416/1 "2019-08-08T18:12:59Z")

</div>

Are there any plans for MakeCode to support devices which have stereo outputs? The Adafruit PyGamer has a 3.5mm stereo audio output and MakeCode Arcade games seem rather unnatural if you are using headphones as it’s one ear only.

Minimal stereo support would be an excellent start, i.e. duplication of left channel to the right one if it exists.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [August 8, 2019, 6:17pm UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416/2 "2019-08-08T18:17:40Z")

</div>

@mmoskal

---

<div class="post-metadata">

**Author:** ![mmoskal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmoskal/32/20_2.png) [@mmoskal](https://forum.makecode.com/u/mmoskal)\
**Post date:** [August 8, 2019, 7:47pm UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416/3 "2019-08-08T19:47:21Z")

</div>

PRs are welcome!

---

<div class="post-metadata">

**Author:** ![mmoskal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmoskal/32/20_2.png) [@mmoskal](https://forum.makecode.com/u/mmoskal)\
**Post date:** [August 11, 2019, 7:48am UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416/4 "2019-08-11T07:48:22Z")

</div>

To be more precise: I tried and failed the problem being that left or right channel would trigger DMA randomly. I think this requires mastering the byzantine eventing system of SAMD which seems beyond my modest capacities.

Maybe Adafruit folks would want to do a PR against [https://github.com/lancaster-university/codal-samd/blob/master/src/SAMDDAC.cpp](https://github.com/lancaster-university/codal-samd/blob/master/src/SAMDDAC.cpp)

There’s a `stereo` branch but it’s a bit stale.

---

<div class="post-metadata">

**Author:** ![kjw](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@kjw](https://forum.makecode.com/u/kjw)\
**Post date:** [August 11, 2019, 9:43am UTC](https://forum.makecode.com/t/stereo-two-channel-audio/416/5 "2019-08-11T09:43:32Z")

</div>

I raised this because of the headphone experience on PyGamer is so weird. That’s a nice feature for discreet gaming.

Their SAMD51 DMA expertise is increasing at the moment, there’s a lot of bugs and issues which are looking like they are in the DMA space:

- [Adafruit Forums: What’s fastest practical sample\_rate for M4 DACs?](https://forums.adafruit.com/viewtopic.php?f=60&t=153797)
- [GH: adafruit/circuitpython: CircuitPython completely freezes upon button click #1908](https://github.com/adafruit/circuitpython/issues/1908)
- [GH: adafruit/circuitpython: audioio does not maintain synchonisation of A0/A1 looping some audioio.RawSample data #1992](https://github.com/adafruit/circuitpython/issues/1992)
- [GH: adafruit/circuitpython: CircuitPython 4.x hang on PyGamer after about 10 minutes of while loop playing stereo audio #2005](https://github.com/adafruit/circuitpython/issues/2005)
