0
0

FMOD v4.32.05 on Win7 64

Sound chain:
Asus Xonar D2X -> SPDIF -> Denon Avr-1709 -> 7.1 speakers

The problem:
7.1 system sounds like stereo when sending sound from PC (back and middle left speakers – first channel, back and middle right – second channel)

The connection of speakers to receiver is valid, they work fine when integrated calibration system/radio playing. Looks like the trouble somewhere between PC and receiver.

Not sure its FMOD problem, but it automatically detects FMOD_SPEAKERMODE_STEREO when initializing. Also there is no way to specify speaker mode in control panel for SPDIF output, so I have to override FMOD settings manually.

Any ideas?

[code:138dvlhs]
class FmodConfig
{
public:
FmodConfig()
{
driver = 0;
output = FMOD_OUTPUTTYPE_DSOUND;
speakermode = FMOD_SPEAKERMODE_7POINT1;
format = FMOD_SOUND_FORMAT_PCM16;
numoutputchannels = 0;
maxinputchannels = 8;
maxvirtualchannels = 200;
disablehardware = false;
autodetect = false;
}

int driver;
FMOD_OUTPUTTYPE output;
FMOD_SPEAKERMODE speakermode;
FMOD_SOUND_FORMAT format;
int numoutputchannels;
int maxinputchannels;
int maxvirtualchannels;
bool disablehardware;
bool autodetect;

};
[/code:138dvlhs]

[code:138dvlhs]
FMOD::System* system;
FmodGuard(EventSystem->getSystemObject(&system));

int numdrivers;
FmodGuard(system->getNumDrivers(&numdrivers));
if (numdrivers == 0)
{
    Logf(_T("WARNING: sound device not found!\n"));
    FmodGuard(system->setOutput(FMOD_OUTPUTTYPE_NOSOUND));
}
else
{
    FMOD_CAPS caps;
    FMOD_SPEAKERMODE speakermode;
    FmodGuard(system->getDriverCaps(0, &caps, 0, 0, &speakermode));

    if (FmodConf.autodetect)
    {
        FmodGuard(system->getDriver(&FmodConf.driver));
        FmodConf.output = FMOD_OUTPUTTYPE_DSOUND;
        FmodConf.speakermode = speakermode;

        FmodGuard(system->setOutput(FmodConf.output));
        FmodGuard(system->setSpeakerMode(FmodConf.speakermode));
    }
    else
    {
        FmodGuard(system->setDriver(FmodConf.driver));
        FmodGuard(system->setOutput(FmodConf.output));
        FmodGuard(system->setSpeakerMode(FmodConf.speakermode));
    }

    if (caps & FMOD_CAPS_HARDWARE_EMULATED)
    {
        /*
        The user has the 'Acceleration' slider set to off! This is really bad
        for latency! You might want to warn the user about this.
        */
        Logf(_T("WARNING: hardware acceleration is disabled!\n"));
        FmodGuard(system->setDSPBufferSize(1024, 10));
    }

    char name[1024];
    FmodGuard(system->getDriverInfo(0, name, sizeof(name), 0));
    if (strstr(name, "SigmaTel"))
    {
        /*
        Sigmatel sound devices crackle for some reason if the format is PCM 16bit.
        PCM floating point output seems to solve it.
        */
        Logf(_T("WARNING: detected buggy Sigmatel sound device!\n"));
        FmodGuard(system->setSoftwareFormat(
            48000, FMOD_SOUND_FORMAT_PCMFLOAT, 0, 0, FMOD_DSP_RESAMPLER_LINEAR));

        FmodGuard(system->setHardwareChannels(0, 0, 0, 0));
    }
    else
    {
        FMOD_SOUND_FORMAT format;
        FMOD_DSP_RESAMPLER resampler;
        int samplerate, nout, maxin, bits;
        FmodGuard(system->getSoftwareFormat(
            &samplerate, &format, &nout, &maxin, &resampler, &bits));

        if (FmodConf.autodetect)
        {
            FmodConf.format = format;
            FmodConf.numoutputchannels = 0;
            FmodConf.maxinputchannels = 8;
        }

        FmodGuard(system->setSoftwareFormat(
            samplerate, FmodConf.format, FmodConf.numoutputchannels, 
            FmodConf.maxinputchannels, resampler));

        if (!FmodConf.autodetect && FmodConf.disablehardware)
        {
            FmodGuard(system->setHardwareChannels(0, 0, 0, 0));
        }
    }
}

LogDeviceInfo();

const FMOD_INITFLAGS initflags = 
    FMOD_INIT_NORMAL;

FmodGuard(EventSystem->init(
    FmodConf.maxvirtualchannels, initflags, 0, FMOD_EVENT_INIT_NORMAL));

[/code:138dvlhs]

  • You must to post comments
0
0

Hi,
The only way you can get multichannel output via optical is to have the soundcard driver support dolby digital or DD plus encoding on the fly.

The XFi can do dolby digital for example but I think you need to pay for the driver or something – I haven’t looked at that for a while.
FMOD only works in 5.1 or 7.1 PCM, and never does any encoding itself.

  • You must to post comments
0
0

Sorry for late reply, FMOD_SPEAKERMODE_PROLOGIC works nice but only for 5.1 (Dolby Pro Logic / Dolby Pro Logic 2 supports 5.1 discrete channels with upmixing to 6.1 or 7.1)

To achieve 7.1 we need Dolby Digital Plus or Dolby TrueHD support. Is it possible to use some external software and encode FMOD resulting sound?

  • You must to post comments
0
0

FMOD will auto select the speaker mode based on what the device driver reports, which can be controlled by the speaker mode setting in the Windows control panel.

If you are using SPDIF you will only be able to send stereo unless your sound card supports accepting a multichannel signal and sending it as an encoded format (outside the control of FMOD). However FMOD does support sending as Dolby Prologic if you use FMOD_SPEAKERMODE_PROLOGIC.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.