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).
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.
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.
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.
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?
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, 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
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.
Interesting, Xenakios, I would have thought Projucer would do that automatically, but nevermind.
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)
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
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
A combination of above works well for me (thanks everyone :)). I do find it more convenient to use Projucer to handle some of this. That way if I ever re-save, or regenerate my Exports from Projucer I don’t have to think about configuring VS manually. For anyone searching this thread the following steps should get you up and running:
Projucer>Exporters>Visual Studio 20xx>Debug>Header Search Paths =
“C:\git\asio\asiosdk_2.3.3_2019-06-14\common”
(Change to wherever you unpacked the sdk )