0
0

Hi,

I’ve created a test project in order to test sound where I’ve inserted a looping 3D-sound at a fixed position. The sound system is using a linear rolloff.

If I move to the right along the x-axis so that I’m at ~3/4 of MaxDistance I get a relatively loud sound in my left- compared to my right speaker, but when listening to them separately I can’t tell a big difference in volume. This is how I think it should be and it sounds good.

When I’ve tried running the same project on other computers I get a totally different experience though. Standing in the same position as in the first test, I can get ~100% sound in the left speaker with the right speaker dead silent.

Does anyone recognize this issue or can someone point out how I can get more information on what’s causing this problem? I have tried to use various get-calls in FMOD.System with nothing good turning up.

The project is written in C# and has only been tried on Windows 7 computers (32 and 64-bit, both appear to get the issue).

  • You must to post comments
0
0

[quote="icuurd12b42":1lg38mja]I asked about the headphones because I hit 2 snags with 2 different head phone that got deffective due to loose/streched wireing. One headphone turned everyting mono. while another reduced the stereo effect drasticaly, turning the sound half mono half stereo in which case, you would not notice the right side completely shuting off when the sound is exactly on the left.[/quote:1lg38mja]

I borrowed and tried another headset from a non-working computer so I know this wasn’t causing it. I still have no idea why my computer gave me the desired effect without resorting to manual pan-scaling. It’s an ASUS UL30VT laptop (awesome stuff) for reference.

  • You must to post comments
0
0

If you dont use the harware mode then I can’t see why you would get different results. Though… Could it be you have some driver setting you can fiddle with?

That’s programming for you. My life was filled with odd things like that. It’s enough to go crazy sometimes.

  • You must to post comments
0
0

Standard answer, dont use the hardware…

use FMOD_SOFTWARE in your create flag and make sure to use the Recommended start up sequence . In the Platform Specific Issues section in the help.

  • You must to post comments
0
0

[quote="icuurd12b42":1lu06yvg]Standard answer, dont use the hardware…

use FMOD_SOFTWARE in your create flag and make sure to use the Recommended start up sequence . In the Platform Specific Issues section in the help.[/quote:1lu06yvg]

Thank you very much for your reply.

Unfortunately I’m already creating my sound with the FMOD_SOFTWARE flag so this doesn’t seem to be the case here. I have compared my startup sequence to that in the FAQ and they seem to do about the same thing. I’ll post the relevant code below.

[edit]I forgot to mention that I am using FMOD version 4.32.01.[/edit]

[code:1lu06yvg]
public FMOD.System FMODSystem { get; set; }
private int nSoundChannels = 512;
private FMOD.CAPS driverCaps;

private void InitFMOD()
{
uint version = 0;
FMOD.RESULT result;
FMOD.System system = null;

        result = FMOD.Factory.System_Create(ref system);
        ERRCHECK(result);
        FMODSystem = system;

        result = FMODSystem.getVersion(ref version);
        ERRCHECK(result);
        if (version < FMOD.VERSION.number)
        {
            throw new Exception("Error!  You are using an old version of FMOD " + version.ToString("X") + ".  This program requires " + FMOD.VERSION.number.ToString("X") + ".");
        }

        result = FMODSystem.setHardwareChannels(0, 0, 0, 0);        // Skip EAX probe which can crash/corrupt some bad drivers
        ERRCHECK(result);

        int nDrivers = -1;
        result = FMODSystem.getNumDrivers(ref nDrivers);
        ERRCHECK(result);
        if (nDrivers == 0)
        {
            result = FMODSystem.setOutput(FMOD.OUTPUTTYPE.NOSOUND);
            ERRCHECK(result);
        }
        else
        {
            driverCaps = FMOD.CAPS.NONE;
            int minfrequency = 0, maxfrequency = 0;
            FMOD.SPEAKERMODE speakermode = FMOD.SPEAKERMODE.STEREO;

            result = FMODSystem.getDriverCaps(0, ref driverCaps, ref minfrequency, ref maxfrequency, ref speakermode);
            ERRCHECK(result);

            result = FMODSystem.setSpeakerMode(speakermode);
            ERRCHECK(result);

            if ((driverCaps & FMOD.CAPS.HARDWARE_EMULATED) == FMOD.CAPS.HARDWARE_EMULATED)      // The user has the 'Acceleration' slider set to off!  This is really bad for latency!
            {
                result = FMODSystem.setDSPBufferSize(1024, 10);
                ERRCHECK(result);
            }

            StringBuilder name = new StringBuilder(256);
            FMOD.GUID guid = new FMOD.GUID();

            result = FMODSystem.getDriverInfo(0, name, 256, ref guid);
            ERRCHECK(result);

            if (name.ToString().IndexOf("SigmaTel") != -1)
            {
                result = FMODSystem.setSoftwareFormat(48000, FMOD.SOUND_FORMAT.PCMFLOAT, 0, 0, FMOD.DSP_RESAMPLER.LINEAR);
                ERRCHECK(result);
            }
        }

        result = FMODSystem.init(nSoundChannels, FMOD.INITFLAGS.NORMAL, (IntPtr)null);
        if (result == FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER)
        {
            result = FMODSystem.setSpeakerMode(FMOD.SPEAKERMODE.STEREO);
            ERRCHECK(result);

            result = FMODSystem.init(nSoundChannels, FMOD.INITFLAGS.NORMAL, (IntPtr)null);

            if (result == FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER)
            {
                result = FMODSystem.setOutput(FMOD.OUTPUTTYPE.WINMM);
                ERRCHECK(result);

                result = FMODSystem.init(nSoundChannels, FMOD.INITFLAGS.NORMAL, (IntPtr)null);
                ERRCHECK(result);
            }
        }

}

[/code:1lu06yvg]

Here is also a snippet from where I create the sound:

[code:1lu06yvg]
FMOD.MODE flags = FMOD.MODE.SOFTWARE | FMOD.MODE._3D_LINEARROLLOFF;
if (is3DSound) flags |= FMOD.MODE._3D | FMOD.MODE._3D_IGNOREGEOMETRY;
else flags |= FMOD.MODE._2D;
if (isStream) flags |= FMOD.MODE.CREATESTREAM;

        ERRCHECK(FMODSystem.createSound(ContentPath + name, flags, ref sound));
        ERRCHECK(sound.set3DMinMaxDistance(minMaxDistance.X, minMaxDistance.Y));

[/code:1lu06yvg]

  • You must to post comments
0
0

as for dead silent right speaker when the sound is on the left, IF exactly on the same axis….

This happens to me too, linear roll off too. when the sound is exactly at the same level, at exactly one side…

play your sound slightly above the player or below the player ears, like 5 units. Naturaly, you would not hit this problem in a natural setup. Say the radio is on the table at 3 feet, your hears are are 6 feet. A cat at 1 feet… You wont get to hera this proble ever… If anything is playing at the same level as the player, just add 5 to the height…

I think I reported this on the forum. It’s not right, I know.

  • You must to post comments
0
0

The 3D sound is a point source, if it is next to the listener it will be panned hard, this is by design. If you want to make a more volumetric sound source you can use the 3dPanLevel property to make the sound blend from 2D to 3D.

  • You must to post comments
0
0

[quote="icuurd12b42":7hxmgiu9]play your sound slightly above the player or below the player ears, like 5 units.[/quote:7hxmgiu9]

Actually I’ve tried this as well, but to no avail :( I still get the same effect, but with a slightly lower volume of course.

[quote="peter":7hxmgiu9]The 3D sound is a point source, if it is next to the listener it will be panned hard, this is by design. If you want to make a more volumetric sound source you can use the 3dPanLevel property to make the sound blend from 2D to 3D.[/quote:7hxmgiu9]

Unfortunately this also makes distant sounds audible even when the listener is further away than MaxDistance, which doesn’t fit well with our application.

The interesting thing here is that out of 5 computers I only get a good balance on one of them (which also happens to be the computer I’m developing at). On my computer I’d say I get about 70/30 % volume out of the left/right speaker in the scenario mentioned above, while on most others 99/1 % or 100/0 % (some managed to get slightly more sound in the right speaker, but it was still very very quiet).

Is there a way to gather more information about the problem? I am stumped about the next step here. I really appreciate your efforts.

  • You must to post comments
0
0

FMOD software sounds played in 3D have the same panning on all PCs. This is tested thoroughly so it could be an issue on your end if you are not seeing consistent panning on different machines.

To make a volumetric sound you would only decrease the 3dPanLevel when the source is close to the listener. When they are far apart then let the sound be entirely 3D.

If you move the sound off the axis as icuurd suggested that will also reduce the hard panning.

  • You must to post comments
0
0

I figure you could also tilt the head (up vector or facing vector or both) slightly…

Are you using headphones on your development PC?

  • You must to post comments
0
0

First of all, sorry for the late reply. Yesterday got a bit hectic and I couldn’t find the time to sit down and test this issue properly.

[quote="peter":2nlhb1ua]To make a volumetric sound you would only decrease the 3dPanLevel when the source is close to the listener. When they are far apart then let the sound be entirely 3D.[/quote:2nlhb1ua]

This worked out very well. Thanks! I can’t believe I didn’t think of this myself :) It seems to me like this would make an excellent addition to the FMOD interface.

[quote="icuurd12b42":2nlhb1ua]Are you using headphones on your development PC?[/quote:2nlhb1ua]

Yes, on all machines. We have a very small office :) A colleague of mine tried the former implementation on his 5.1 system at home though and he had a very bad experience. When he had an enemy behind him he’d get all sound in his rear speakers. If he then ran past the enemy all sound would be transferred to his front speakers in an instant. In a high-pace, close encounter kind of game this gets quite annoying 😉

Thank you both for your time and efforts!

  • You must to post comments
0
0

I think the pan level is best to resolve this.

I asked about the headphones because I hit 2 snags with 2 different head phone that got deffective due to loose/streched wireing. One headphone turned everyting mono. while another reduced the stereo effect drasticaly, turning the sound half mono half stereo in which case, you would not notice the right side completely shuting off when the sound is exactly on the left.

I learned to test my headphones often with a stereo test wav.

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.