I have an app that can use 4 speakers, where speakers 3 and 4 might sometimes be used for a metronome while stereo output is used for audio tracks. I know under IOS 7 and newer you can use multichannel class-compliant USB audio interfaces like Traktor Audio DJ Mk 2 and address 4 or more output channels. This is what I am trying to get working.

Under Windows and MacOS, I have this working like this (with my Traktor):


    Track::SoundSystem->setDriver(0);            //This will be the Traktor

    // Init the soundsystem first to get its preferred values
    result = Track::SoundSystem->init(100, FMOD_INIT_NORMAL, 0);

    // Ask for 4 hardware channels. Does not seem to do anything on any OS
    result = Track::SoundSystem->setHardwareChannels(4);

    // Get the preferred values
    Track::SoundSystem->getSoftwareFormat(&samplerate, &format,
                      &numoutputchannels, &maxinputchannels, &resamplemethod, &bits );

    // Close and reopen, asking for 4 output channels and using everything else that was set up by the first init
    Track::SoundSystem->setSoftwareFormat(samplerate, format, 4, maxinputchannels,
                      resamplemethod );

    Track::SoundSystem->init(100, FMOD_INIT_NORMAL, 0);
    SetSpeakerLevels, etc

On Windows and Mac, this code works and I get my 4 channel output. I use ASIO on WIndows, but I never need to specify it to FMOD.

On IOS, it all runs and I get good return codes, but I never hear channels 3 and 4 on my device.
Any ideas as to what I need to do to get the upper output channels to be heard on IOS?

  • You must to post comments

Hi Mark,
FMOD in iOS doesnt support enumerating devices and would always return 1 for getNumDrivers.

You’re right that setHardwareChannels does nothing, because that is talking about voices (like a soundcard that has 32 3d hardware voices for example). A 4 channel output stream is not related to this.

We’d possibly have to add device enumeration to the iOS version which is not normally a thing. We’ll discuss it here.

  • Brett Paterson
    it looks like it takes over the default device, so it might be a matter of the mixer not supporting 4ch mixing on ios
  • Mark Snyder
    Yes device 0 is the Traktor once it hooks up. I believe that is correct. This device is the Mk 2 version specifically designed for IOS. Perhaps their app they sell runs directly on CoreAudio. My thinking was perhaps something in the FMOD IOS audio setup code was not anticipating that 4 channels would be available under IOS, as it is a fairly recent addition.
  • Brett Paterson
    Yes FMOD for iOS is hardcoded (#ifdef'ed) to be stereo only to save code space etc, because only stereo is expected. On android it supports 5.1 etc, so we might be able to unlock it for iOS as well
  • Mark Snyder
    Thanks for considering it. This is a key capability for thingas like multitrack know players, so if it is made available I am sure folks will find it useful.
  • Brett Paterson
    we just got a Traktor by the way and are testing with it now
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.