Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Play MONO through both channels possible?

  1. #1
    Senior Member
    Join Date
    Aug 2014

    Play MONO through both channels possible?

    I have a circuit for sgtl5000 audio codec but have 2 amplifiers on left and right output. I can only get sound on one channel when using mono source file. Can I get it to play on both at same time?

    Otherwise, maybe just tie the pins together, but maybe noise, and I lose stereo capability. Wanted some tracks maybe mono, and sometimes stereo.

    //////////////////////// Audio Setup ///////////////////////////
    AudioPlaySdRaw raw4; //channel 4 playback
    AudioPlaySdRaw raw3; //channel 4 playback
    AudioPlaySdRaw raw2; //channel 4 playback
    AudioPlaySdRaw raw1; //channel 4 playback
    AudioMixer4 mixer1; //combines up to 4 channels, can play even more if needed by more mixers
    AudioOutputI2S i2s; //I2S type playback (opposed to I2C etc)
    AudioConnection patchCord1(raw4, 0, mixer1, 3);
    AudioConnection patchCord2(raw3, 0, mixer1, 2);
    AudioConnection patchCord3(raw2, 0, mixer1, 1);
    AudioConnection patchCord4(raw1, 0, mixer1, 0);
    AudioConnection patchCord5(mixer1, 0, i2s, 0);
    AudioControlSGTL5000 sgtl5000; //audio codec chip

  2. #2
    Join Date
    Nov 2017
    Just add the following,
    AudioConnection patchCord6(mixer1, 0, i2s, 1);

  3. #3
    Senior Member
    Join Date
    Aug 2014
    Works perfectly!


    I figured it was something not configured correctly in the library, didn't really see a place in the documentation on how to wire up stereo vs mono.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Several parts of the tutorial involve mono sound that's sent to both I2S channels. The first is in part 2-3 on page 14 of the PDF.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts