0
0

When trying to make System.Init with Outputype ASIO return an error ERR_OUTPUT_INIT and it does not work. With DirectSound everything works well, including stereo, 5,1, 4.0. Where it is the error? I already try with setSpeakerMode = FMOD.SPEAKERMODE.RAW… have to configure something? (setOutputFormat, setSpeakerMix, setSpeakerLevels)

  • You must to post comments
0
0

Ok, tanks. I did not know it… 😉

  • You must to post comments
0
0

Is your asio driver correctly installed.

  • You must to post comments
0
0

Yes. Work fine in Sound Forge 8.0 and Vegas.

  • You must to post comments
0
0

[quote="Colores":pu7ewzv0]Yes. Work fine in Sound Forge 8.0 and Vegas.[/quote:pu7ewzv0]

…not in FMOD 😥

  • You must to post comments
0
0

Using the ASIO4ALL driver it works fine on this machine, maybe you should try that driver instead as a test. It must be something about your ASIO driver that is causing it.

  • You must to post comments
0
0

I already test with Asio4All and Kx Drivers in my Sound Blaster Live! and not work, same result…

Asio works with setSpeakerMode = FMOD.SPEAKERMODE.RAW? It can be the error there? Or it does not matter?
Any example?

  • You must to post comments
0
0

maybe your software setup was only set to 2 channels, so raw speakermode works. What about stereo?

  • You must to post comments
0
0

I follow without making work ASIO correctly. I am going to give some details to see if they can help me.
[list:1l3zyg0b]
[:1l3zyg0b]Sound onboard soundMAX 5.1 in Asus M2NPV-VM.[/:m:1l3zyg0b]
[:1l3zyg0b]Windows XP SP2. [/:m:1l3zyg0b]
[:1l3zyg0b]ASIO through asio4all with the options by default.[/:m:1l3zyg0b]
[:1l3zyg0b]asio4all says [i:1l3zyg0b]Out: 8x 0.1-192kHz, 32Bits[/i:1l3zyg0b][/:m:1l3zyg0b][/list:u:1l3zyg0b]
I have two players in my application, for each one use an instance of the [b:1l3zyg0b]Player[/b:1l3zyg0b] class.
In the main form:

[code:1l3zyg0b]public static Player Player1 = new Player();
public static Player Player2 = new Player(); [/code:1l3zyg0b]

The class are declared in this way:

[code:1l3zyg0b]public class Player
{
/// <summary>
/// Fmod
/// </summary>
private FMOD.System pSystem;
private FMOD.Channel pChannel;
private FMOD.Sound pSound;
private FMOD.RESULT pResult;

(continue...)

public actualConfig actualAudioConfig = new actualConfig();
    public struct actualConfig
    {
        public FMOD.OUTPUTTYPE outputType;
        public Driver driver;
        public int driverIndex;
    }

(continue...)


public struct SpeakerMix
    {
        public float spFrontleft;
        public float spFrontright;
        public float spCenter;
        public float spLfe;
        public float spBackleft;
        public float spBackright;
        public float spSideleft;
        public float spSideright;
    }

(continue...)[/code:1l3zyg0b]

I initialize fmod this way (within the Player class):

[code:1l3zyg0b] public FMOD.RESULT InitFmod()
{
try
{
CloseFmod();
}
catch (Exception e)
{
}

        pResult = FMOD.Factory.System_Create(ref pSystem);
        if (pResult != FMOD.RESULT.OK) return pResult;

        pResult = pSystem.setOutput(actualAudioConfig.outputType);
        if (pResult != FMOD.RESULT.OK) return pResult;
        pResult = pSystem.setDriver(actualAudioConfig.driverIndex);
        if (pResult != FMOD.RESULT.OK) return pResult;
        pResult = pSystem.setSoftwareChannels(4);
        if (pResult != FMOD.RESULT.OK) return pResult;
        pResult = pSystem.setSpeakerMode(actualAudioConfig.driver.SpeakerMode);
        if (pResult != FMOD.RESULT.OK) return pResult;
        pResult = pSystem.init(8, FMOD.INITFLAG.NORMAL, (IntPtr)null);
        return pResult;
    }[/code:1l3zyg0b]

[i:1l3zyg0b]I have CloseFmod () because the user can have chosen a different configuration for the output of audio [b:1l3zyg0b](actualAudioConfig.driverIndex, actualAudioConfig.outputType, actualAudioConfig.driver.SpeakerMode)[/b:1l3zyg0b] then it would be necessary to reinit. Of all ways without [b:1l3zyg0b]CloseFmod()[/b:1l3zyg0b] it fails equal.[/i:1l3zyg0b]

[code:1l3zyg0b] public void CloseFmod()
{
pSystem.release();
pSystem = null;
}[/code:1l3zyg0b]

fmod fails here:
color=#FF0000:1l3zyg0b [/color:1l3zyg0b]
[code:1l3zyg0b]pResult = pSystem.init (8, FMOD.INITFLAG.NORMAL, (IntPtr) null);[/code:1l3zyg0b]

[b:1l3zyg0b]ERR_OUTPUT_INIT – Error initializing output device.[/b:1l3zyg0b]

Trying again and it works perfectly! (¿?)
This it is the code to play stream:

[code:1l3zyg0b]pResult = pSystem.createStream(temaActual.RutaCompleto, FMOD.MODE.SOFTWARE | FMOD.MODE.CREATECOMPRESSEDSAMPLE |

FMOD.MODE.ACCURATETIME | FMOD.MODE.LOOP_OFF | FMOD.MODE.IGNORETAGS, ref pSound);
if (pResult != FMOD.RESULT.OK) return pResult;

pResult = pSystem.playSound(0, pSound, true, ref pChannel);
if (pResult != FMOD.RESULT.OK) return pResult;

pChannel.setSpeakerMix(actualAudioConfig.driver.SpeakerConfig.spFrontleft,

actualAudioConfig.driver.SpeakerConfig.spFrontright, actualAudioConfig.driver.SpeakerConfig.spCenter,

actualAudioConfig.driver.SpeakerConfig.spLfe, actualAudioConfig.driver.SpeakerConfig.spBackleft,

actualAudioConfig.driver.SpeakerConfig.spBackright, actualAudioConfig.driver.SpeakerConfig.spSideleft,

actualAudioConfig.driver.SpeakerConfig.spSideright);[/code:1l3zyg0b]

[b:1l3zyg0b]SpeakerConfig[/b:1l3zyg0b] takes values of volume depending on the amount of channels (stereo, quad, 5.1….) and as it is wanted to select.

Let us continue…

I set in the Control Panel of Windows the sound as 5.1 and fmod detects it perfectly (FMOD.SPEAKERMODE. _5POINT1)

I initialize with [b:1l3zyg0b]directX[/b:1l3zyg0b] in the 2 systems (Payer1 and Player2), I assign the volumes with [b:1l3zyg0b]setSpeakerMix[/b:1l3zyg0b] this way:

Player1:
spBackleft 0.0
spBackright 0.0
spCenter 0.0
spFrontleft 1.0
spFrontright 1.0
spLfe 0.0
spSideleft 0.0
spSideright 0.0

Player2:
spBackleft 1.0
spBackright 1.0
spCenter 0.0
spFrontleft 0.0
spFrontright 0.0
spLfe 0.0
spSideleft 0.0
spSideright 0.0

And when loading stream…

[code:1l3zyg0b]
pChannel.setSpeakerMix(actualAudioConfig.driver.SpeakerConfig.spFrontleft,
actualAudioConfig.driver.SpeakerConfig.spFrontright, actualAudioConfig.driver.SpeakerConfig.spCenter,
actualAudioConfig.driver.SpeakerConfig.spLfe, actualAudioConfig.driver.SpeakerConfig.spBackleft,
actualAudioConfig.driver.SpeakerConfig.spBackright, actualAudioConfig.driver.SpeakerConfig.spSideleft,
actualAudioConfig.driver.SpeakerConfig.spSideright);[/code:1l3zyg0b]

… everything works correctly, I have stream stereo in the front speakers and other stereo stream in the back speakers. [b:1l3zyg0b]Perfect![/b:1l3zyg0b]

Testing same with ASIO and fmod says to me that the configuration of the speakers is [b:1l3zyg0b]STEREO[/b:1l3zyg0b] (¿?)
I select for a Player1 the frontal speakers and for the Player2 I select the rear speakers of the same way and forcing QUAD configuration in SpeakerMode:

    spBackleft  1.0
    spBackright 1.0

Player1 works well in the frontal speakers after of pass through the error marked with color=#FF0000:1l3zyg0b[/color:1l3zyg0b]… but works!
Load a stream in Player2 with the corresponding configuration of setSpeakerMix for Player2 and immediately stops the audio in Player1 and begins to play in the speakers of center/subwoofer (¿?) when it would have to play in the rear speakers.
(Setting the Control Panel of Windows with audio as QUAD or Stereo fmod continue detecting ASIO like STEREO, but directX works OK)
Of all ways in ASIO when loading stream in Player2 this interrupts the sound that was playing in Player1 and vice versa, so I must solve that first.

Some idea?
That I am making bad?
Some tutorial for a specific case like this?

  • You must to post comments
0
0

Some example of how to play 2 different stereo streams in 2 different fmod.systems in 2 different outputs in ASIO [b:1jvc117l]simultanously[/b:1jvc117l]?

system1 -> stereo stream -> ASIO -> front speakers

system2 -> stereo stream -> ASIO -> rear speakers

When it loads in system1 works fine… when load a stream in system2 then system1 stops. It is as if system2 was reusing the channel of system1. I am going to continue trying it…

Tanks.

  • You must to post comments
0
0

Yes because asio isnt meant to run twice simultaneously. You can only initiate a soundcard once.

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.