0
0

Hello fmod-community!
Im trying to develope a visualizer for audio signals but im stuck rightly at the beginning. My program worked fine on my laptop (real time signals) but I had to switch to my desktop pc because it has a multitrack Maudio Delta 1010LT recording device which I need. Now I have a very bad latency (>3s) and Im sure im doing something wrong with my ASIO settings in the C# sourcecode. Ive tried several settings but I failed.

Now Im working with the ASIO DirectX FullDuplex Driver but I have no idea how to get to the wave data of every single of my 6 channels (3x L&R)

[code:1wsecy7v]public void init(int playdriver, int recorddriver)
{
FMOD.Factory.System_Create(ref audiosystem);

        audiosystem.setOutput(FMOD.OUTPUTTYPE.ASIO);
        audiosystem.setDriver(playdriver);
        audiosystem.setRecordDriver(recorddriver);

        audiosystem.init(32, FMOD.INITFLAG.NORMAL, (IntPtr)null);
        audiosystem.setSoftwareFormat(outputrate, FMOD.SOUND_FORMAT.PCM16, 0, 0, FMOD.DSP_RESAMPLER.LINEAR);

        FMOD.CREATESOUNDEXINFO exinfo = new FMOD.CREATESOUNDEXINFO();
        exinfo.cbsize = Marshal.SizeOf(exinfo);
        exinfo.numchannels = 1;
        exinfo.format = FMOD.SOUND_FORMAT.PCM16;
        exinfo.defaultfrequency = outputrate;
        exinfo.length = (uint)(exinfo.defaultfrequency * 2 * exinfo.numchannels * 5);

        audiosystem.createSound("", (FMOD.MODE.ACCURATETIME | FMOD.MODE._2D | FMOD.MODE.SOFTWARE | FMOD.MODE.LOOP_NORMAL | FMOD.MODE.OPENUSER), ref exinfo, ref audiosound);

audiosystem.recordStart(audiosound, true);
audiosystem.playSound(FMOD.CHANNELINDEX.REUSE, audiosound, false, ref audiochannel);
audiochannel.setVolume(0);

    }[/code:1wsecy7v]

DriverName: [i:1wsecy7v]M-Audio Delta ASIO[/i:1wsecy7v]
RecordDriverName: [i:1wsecy7v]ASIO DirectX Full Duplex Driver[/i:1wsecy7v]

Does anyone have an idea how to "split" the duplex signal in fmod to get the channels out of that asio driver?

Thank you!

Greetings,
marblecake

ps.
the recording device / driver works perfectly in other applications (cubase)

  • You must to post comments
0
0

okay, now I found out that I can determine the channel with the third int parameter ([i:3bz5fvm1]getWaveData(float[] wavearray, int numvalues, [b:3bz5fvm1]int channeloffset[/b:3bz5fvm1]) or public RESULT getSpectrum(float[] spectrumarray, int numvalues, [b:3bz5fvm1]int channeloffset[/b:3bz5fvm1], DSP_FFT_WINDOW windowtype))[/i:3bz5fvm1]):

[code:3bz5fvm1]audiochannel.getSpectrum(spectrum, SPECTRUMSIZE, ch, FMOD.DSP_FFT_WINDOW.TRIANGLE);[/code:3bz5fvm1]

[code:3bz5fvm1]audiochannel.getWaveData(wavedata, WAVEDATASIZE, ch);[/code:3bz5fvm1]

Im able to get very low latency signals of my first two inputs (ch = 0 or ch = 1), but there are 6 more I want to read out.. if I set my parameter ch to 2 my application is crashing. What do I do wrong?

Greetings

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.