RtAudio Problems in Win 8.1 in of-0.8.0 (Fixed)

#1

I need to use the Snowball iCE for a project of mine that just uses sound input to trigger video effects. I have done simple applications like this before and never had any problems but now that I have plugged the microphone into my computer the only audio device that comes up is ASIO for C-Media USB DAC Device

I also get an error:

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

I tried uninstalling the driver but that has made no difference. It does not matter if the device is plugged in or not. I saw a similar forum topic on the matter but is there not a better solution than recompiling rtAudio to ignore ASIO?

Windows 8.1 OF-0.8.0 VS-2012

Edit: I tested in in OF-0.7.4 and it works though oddly enough it also broke MaxMSP 5.19, I have contacted C-Media about this hopefully they will have a solution.

Edit: C-Media was of no help, trick was I was always using direct sound and the blue snowball made my audio change to ASIO which only had the one device on it. Seems like one could get away without having to recompile the RtAudio lib if one flags they are using direct sound but it turned out to be beneficial in the long run. RtAudio would crash if the device got unplugged while the application was running. Problem seems to be sorted out now.

RtAudio, MBOX Digidesign, openframeworks 0.8.4 Visual Studio Error
#2

in rtAudio at lines 4892 and 4924 respectively you will find this code. The RtError System Error causes the program to crash but just commenting it out and telling it to stop the stream prevented crashing.


    if ( FAILED( result ) ) {
      errorStream_ << "RtApiDs::callbackEvent: error (" << getErrorString( result ) << ") getting current read position!";
      errorText_ = errorStream_.str();
      //error( RtError::SYSTEM_ERROR );
    stopStream();
      return;
    }
#3

Hello DomAmato,

I am experiencing the same issue, however, with win7. Since plug-ing my Snowball blue All my sound project do not work anymore and soundStream.listDevices(); return

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

I see that you have managed to fix your issue, but I am unable to comprehend the solution, sorry I bit of a noob i guess…:slight_smile:

#4

You have to recompile the RTAudio library. They recently updated to support WASAPI too which is nice. I have an updated library that I will link in this comment. I have it compiled for WASAPI but I forget if I did it for DirectSound or ASIO. Download the files and place them in the respective folder.

unzip these and put them in the libs/rtaudio/include
http://www.mediafire.com/download/dkn6sl4t5l65xol

unzip and put them in libs/rtaudio/lib/vs
http://www.mediafire.com/download/36nzmcy85s8t9eb

#5

Thanks for the quick reply.

Unfortunately, replacing the library does not work. I get a linking error. I’ll try to compile the library and see from there.

any pointers for compiling?

did you compile at build time with VS or pre-compile a static lib using the cmd, then move the files in the OF file structure…sorry just a bit confuse for the process

really thanks for your time.

#6

Yeah it has to be a statically compiled. What kind of linking error do you get specifically? What are you using, Visual Studio 2012?

heres the enumerator that handles what API is included in the compilation

  //! Audio API specifier arguments.
enum Api {
    UNSPECIFIED,    /*!< Search for a working compiled API. */
    LINUX_ALSA,     /*!< The Advanced Linux Sound Architecture API. */
    LINUX_PULSE,    /*!< The Linux PulseAudio API. */
    LINUX_OSS,      /*!< The Linux Open Sound System API. */
    UNIX_JACK,      /*!< The Jack Low-Latency Audio Server API. */
    MACOSX_CORE,    /*!< Macintosh OS-X Core Audio API. */
    WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */
    WINDOWS_ASIO,   /*!< The Steinberg Audio Stream I/O API. */
    WINDOWS_DS,     /*!< The Microsoft Direct Sound API. */
    RTAUDIO_DUMMY   /*!< A compilable but non-functional API. */
  };

I would compile the WASAPI and DS API’s since ASIO is the one giving you problems. You can pass along the API flags before you compile and it will include those API’s when it makes the static lib.

I should probably review how I did it since it was awhile ago and I’m going off of memory. But it was pretty easy getting a project setup to compile. I will include a link for a zip of the VS project files as they are on my desktop machine at home.

#7

Thanks DomAmato,

sorry for the late reply been sick

Anyway,

your compiled library works !! Big Thanks.

However, if it`s not to much to ask my I know how you compile the rtaudio lib. I am reading on how to create static library but I am still confuse haha. Did you create object files per needed cpp file then combined them to create the “rtAudio.lib” and “rtAudioD.lib” if so which files goes in which library…

Thanks for you time

Sam

#8

Sorry I intended to attach the project while I was at it but this tutorial on MSDN is really how you should do it: https://msdn.microsoft.com/en-us/library/vstudio/ms235627(v=vs.110).aspx

Just make sure to include all the files that come with the rtAudio download and that you tell the compiler which libraries you want to be precompiled by using #define _ WINDOWS_WASAPI__ and so on. Sorry for being a bit short on the details. I setup the static library to compile with over a year ago and have just changed the files when they update the rtAudio lib. I do remember it being quite easy though. Just make sure you use the right compiler for whatever version of visual studio you are using.

#9

Hey @DomAmato - same issue here, but with a Digidesign ASIO driver. Thanks for the discussion. Any way to get those links put back up?

Best,
BB