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).
Did you enable JUCE_ASIO? It’s disabled by default because you need the Steinberg asio header files to build with it.
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.
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
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.
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.
SOLVED: Introjucer->Config Panel->Target (VS2013 in my case)->Debug->Header Search Paths
I am learning. Thanks again. Hope this helps others.
Hi, I want to also enable ASIO, but Producer does not have those header file options. How is this done in Juce 5?
I think you are looking for this options:
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>
Can I not use GROUPS for header files?
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:
#error do not use this
AsioDriver::AsioDriver (LPUNKNOWN pUnk, HRESULT *phr) : CUnknown(“My AsioDriver”, pUnk, phr)
void DEBUGGERMESSAGE(char *string)
DebugStr((unsigned char *)string);
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)
I finally figured out I don’t need any of the ASIO cpp files! phew
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:
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.
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:
Download and unpack ASIO SDK from: https://www.steinberg.net/en/company/developers.html
Projucer>Exporters>Visual Studio 20xx>Debug>Header Search Paths =
(Change to wherever you unpacked the sdk )
Do the same for Release>Header Search Paths
Projucer>Modules>juce_audio_devices>JUCE_ASIO = Enabled
I didn’t do anything fancy to install the sdk, nor did I set any system path variables, in case you’re wondering.
Hope this helps someone,
Thank you for sharing this, you just save my day!!!
That did the trick. Thanks mate.