RtApiAsio::getDeviceInfo: error (Hardware input or output is not present or available.) initializing driver (ASIO for Generic USB Device)

hello, I was trying to redo this guide on audio and sound buffering from
https://github.com/ofZach/avsys2012/tree/master/week1_audioAndSoundBufferTogether and got the error and saw some solutions on a different on changing ofRtAudioSoundStream.cpp on line 36 to return RtAudio::Api::WINDOWS_DS; but still got the same error. Asio4all didn’t work for me as well.

Old as heck but removing ASIO drivers (for focusrite scarlett in my case) did the trick to get it up and running at lease. Sub optimal for sure, I would quite like to use my external soundcard…

Hello, I’m getting this error specifically when using ofxHapPlayer (not when using ofVideoPlayer):

[ error ] RtApiAsio::probeDeviceOpen: error (Hardware input or output is not present or available.) initializing driver (GP-10).
[ error ] ofxHapPlayer: Error starting audio playback.

Now, this is odd because I didn’t have the GP-10 set to be my computer’s audio output device, but rather my Presonus. Even turning off the GP-10 and reloading the project gives the same error. Anyone know what to do? Maybe @pierre_tardif00 or @roymacdonald ?

Hi. I am guessing you are on windows because of using ASIO.
I am not sure if you can set which audio device is to be used by ofxHapPlayer. It might be grabbing just the first available audio interface.
When you print the audio devices using ofSoundStream, what do you get? In which order do these report?

Hey @roymacdonald , thanks as always for the quick answer. Yeah, I’m on Windows 10. When I print out the stream devices I only get

Realtek ASIO

I checked the other APIs and both MS_WASAPI and MS_DS show スピーカー (2- PreSonus AudioBox iTwo) , though it’s shown as two separate devices: one with 2 inputs and 0 outputs and one with 0 inputs and 2 outputs (though the “default device” shows two inputs and two outputs channels…)

Running this code in setup() to change the API to WASAPI or DS

ofSoundStream stream;|
ofSoundStreamSettings streamSettings;|
streamSettings.numInputChannels = 2;|
streamSettings.numOutputChannels = 2;|
streamSettings.sampleRate = 44100;|
streamSettings.bufferSize = 256;|
streamSettings.numBuffers = 4;|
streamSettings.setApi(ofSoundDevice::Api::MS_DS); //MS_WASAPI, MS_DS, MS_ASIO|

gives a Debug Assertion Fail popup: “Expression: vector subscript out of range”. Also, the “RtApiAsio::getDeviceInfo” error about GP-10 still shows up, so it looks like the attempt at changing the API is just failing.

I found a suggestion in another thread for Windows users to use ofxDSHapVideoPlayer, so I’ll try that in the morning.

EDIT: OK, I got ofxDSHapPlayer working. Here are notes on how to do it for any Windows user that needs it:

GitHub - UltraCombos/ofxDSHapVideoPlayer: ofxDSHapVideoPlayer is a Hap video player addon for openFrameworks (Windows-only)

To convert .mov or other files to hap .avis, I used this guide

Create Windows Native HAP avi Video Files : TroikaTronix

and followed the instructions for VirtualDub. Note that for a lot of input files you’ll need this plugin for VirtualDub:

Virtualdub FFMpeg Input Plugin download | SourceForge.net

Original post:

So, a couple of things, @roymacdonald :

  1. I always use the project generator to make vs2017 projects, I open them in vs2019 and retarget them. Is this alright? Or is it causing some of the problems below?

  2. If I create a new project and run the streamSettings (in my above post) code to change the api, the Debug Assertion Fail popup will appear only in Debug mode, but not in Release mode.

  3. If I have ofxHapPlayer in a project, I can only run in Debug mode. When I try Release, I get the error:

‘_ITERATOR_DEBUG_LEVEL’: value ‘2’ doesn’t match value ‘0’ in main.obj

  1. ofxDSHapVideoPlayer requires DirectShow hap codecs for making .avi files, but the links to getting it on the github pages are dead.

I’ve really enjoyed working with oF when drawing 3D/2D stuff and using a Kinect, but really discouraged that setting up simple video and audio stuff is taking me days and I feel like I’m getting nowhere.

1 Like