ASIO audio


#1

Hi, Newbe here.

I am new to juce and am have trouble using asio devices. I am using sopce/pulsar hardware and have both wave and asio drivers available. I am trying to configure use of asio devices.

My scope setup has 64 in and 64 out asio devices configured. But the asio devices do not show up in the dialog displayed by AudioDeviceSelectorComponent. I thought it may be something I did wrong in my ap so I started the Juce Demo and it shows the same thing. I see lots of devices, but none of the asio devices. To confirm I am working I started Sonar, and it shows all 64 ins and outs.

Do I need to do something to tell Juce to include asio, or switch to asio somehow? (sonar you have to switch).

Thnaks.
Mark


#2

Did you enable JUCE_ASIO? It’s disabled by default because you need the Steinberg asio header files to build with it.


#3

That makes sense. I could not find any documentation that spells this out. So I searched the entire project for ASIO and found JUCE_ASIO. I set it to 1 then added the asio common header to my include path and it worked.

Thanks.


#4

Can I get some clarification on this?

I'm trying to enable ASIO in the Juce Demo as a test...

In visual studio 2013, I've tried  adding the base ASIO SDK directory, and I've also tried adding the 'common' directory which seems to contain more useful files. I added via both Properties->VC++->Include Directories and Properties->C++->General->Additional include directories .... not sure which one is correct (if either).

 

I've also set

#define JUCE_ASIO 1

...in JuceDemoHeader.h.

 

Am I adding the right folders, or should I do anything else to make this work?

Also, where in the can I find the 'ASIOAudioIODevice class's header file' for more information? I can only find reference to it in juce_audio_devices and the juce_win32_ASIO.cpp.

 

Thanks


#5

Though there's nothing wrong with going about this manually, I'd suggest using the Introjucer to setup module and project flags (if you can)...

In an Introjucer project, you will see that toggling options like ASIO and its include path become a cinch. Also, reverse-engineering what has been generated from an Introjucer project (ie: a .vcxproj and .sln file for a Visual Studio project) may help uncover any clues.


#6

I thought about doing it via the introjucer - but I don't think I get all the audio specific options if I am doing a basic gui application. Is there a way to enable those flags?

 

Maybe generate the project as a plugin, then copy the plugin processor / editor files into the standalone app?

 

Thanks


#7

I found the ASIO options - in the IntroJucer configuration screen, under modules->Juce Audio Devices was the flag you were referring to.

 

Then to include the directory in VS2013, I went to Project Properties->C/C++->General->Additional Include Directories

 

Now I am trying to figure out why it says my device is unavailable.

 

When I try to use my onboard soundcard ASIO drivers, I get a 'cannot open audio i/o' error within my program.

When I try to use ASIO4ALL, the output is unavailable, complaining about 'MS WAVETABLE SYNTH'...so I'm hunting down that now. Not where I would expect on Windows 8.

 

Thanks


#8

I was able to solve the problem by changing my RealTek settings to 44.1k / 16 bit - not optimal but seems to be the best thing that works.

 

One thing I noticed is that when I rebuild the VS project, my included directories are not saved. So I lose access to the asio header file.

Is there a way to set the include directories via the Introjucer? I tried adding the file itself via the files page, but that doesn't seem to do it.

 

Thank you.

 

SOLVED: Introjucer->Config Panel->Target (VS2013 in my case)->Debug->Header Search Paths

 

I am learning. Thanks again. Hope this helps others.


#9

Hi, I want to also enable ASIO, but Producer does not have those header file options. How is this done in Juce 5?


#10

I think you are looking for this options:

HTH


Windows buffer size won't go below 132
#11

Thanks, but I was asking about header files.
OK. Here’s what I got so far…
I create a new GROUP called ASIO and I add the asio 2.3 sdk files into there.
I run VS2017 from the projucer. On compile I appear to have to exclude a couple of CPP files debugmessage.cpp & asiodrvr.cpp which are causing build errors.

I then get a an errror in Juce libraries on not finding the header in the line: #include <iasiodrv.h>
in juce_audio_devices.cpp

Can I not use GROUPS for header files?


#12

To make the compiler find header files, they need to be in your include paths. Just adding them into the project either in Projucer or in Visual Studio will not work.


#13

Interesting, Xenakios, I would have thought Projucer would do that automatically, but nevermind. :slight_smile:
The two files I get errors from had this in, note the bold lines:
#if WINDOWS
#error do not use this
AsioDriver::AsioDriver (LPUNKNOWN pUnk, HRESULT *phr) : CUnknown(“My AsioDriver”, pUnk, phr)
{
}
&
#if DEBUG
#if MAC
#include <TextUtils.h>
void DEBUGGERMESSAGE(char *string)
{
c2pstr(string);
DebugStr((unsigned char *)string);
}
#else
#error debugmessage
#endif
#endif

And without them I get get 14 unresolved external errors like this one…
asio.obj : error LNK2019: unresolved external symbol “public: void __cdecl AsioDrivers::removeCurrentDriver(void)” (?removeCurrentDriver@AsioDrivers@@QEAAXXZ) referenced in function “long __cdecl ASIOExit(void)” (?ASIOExit@@YAJXZ)
&
unresolved external symbol “class AsioDrivers * asioDrivers” (?asioDrivers@@3PEAVAsioDrivers@@EA)


#14

I finally figured out I don’t need any of the ASIO cpp files! phew


#15

Hi, sorry to re-awaken a dead topic but I have having a bit of a pain setting up the AudioPluginHost to include ASIO.

I have enabled the ASIO flag in the projucer, and I have included the asio/common and asio/host folders into the VS2017 solution, but I am getting a linker error:

linker error
which i see DaveH also got.
I am a bit confused by his response “I don’t need any of the ASIO cpp files!”.

Can anyone please help me understand why I am seeing these linker errors?

I am using JUCE 5.3.2 from the master branch, and the steinberg ASIO SDK version 2.3.1

Many Thanks,
Simon


#16

So essentially I had unnecessarily added files into the project, which causes the error I was seeing (above).
The steps to add ASIO support to the AudioPluginHost were as follows:

  • Checkout a totally clean copy of the project, discarding any changes
  • Open the project in the projucer
  • Navigate to modules>juce audio devices
  • Select the drop-down menu for JUCE_ASIO
  • Select “enable”
  • Select the correct IDE from the drop-down list (VS2017 for me)
  • Hit the “Save and open project in IDE”
  • Select the solution
  • Open the properties for the project by using the wrench icon
  • Select C/C++ > General
  • Select “Additional include directories” down arrow on right hand side > Edit
  • Select the next empty row
  • Select the new folder Icon
  • Click the “…” dialog link
  • Navigate to the “common” folder of the steinberg ASIO SDK and select that as the target folder
  • Apply and OK out of the menus
  • Rebuild the solution

This should complete successfully.
Many Thanks,
Simon