2

I was very impressed by an Arduino compatible MCU (Teensy 3.2) that can do some DSP which the user configures using a graphical editor. But my only option to have digital inputs is to use a Windows PC as USB host. The audio I want to process comes from an HDMI extractor's Toslink output. My goal is to use a USB soundcard with a Toslink input to route the signal from the extractor through Windows and out to the Arduino.

So my question is this: will the signal coming in one USB cable and going out another USB cable come into "contact" with the audio portion of a video file which a media player is running out the HDMI port? I want to use at least one or more of: Windows 7, Windows8.1, and/or Windows 10.

| |
0

First, I'll try to describe my understanding of your situation:

Audio inputs:

  • USB soundcard from TOSLINK
  • Video player on Windows

Audio outputs:

  • USB soundcard to DSP
  • HDMI output

Desired routing:

  • USB from TOSLINK => USB to DSP
  • Video player => HDMI

And there is no interaction between the two streams. I assume the "HDMI extractor" has nothing to do with the "video player".


If the above understanding is correct, then, yes, you can do what you want. Windows lets applications choose which audio device to output to.

You can do either of the below, or both if you prefer:

  • Configure the video player to use the HDMI audio output. For example, both Windows Media Player and VLC allow you to select an audio output device in their settings.

    If your video player lets you use WASAPI Exclusive Mode, you should do so. This prevents Windows from performing any conversions (sample rate, etc.) of the output, allowing you to preserve a bit-for-bit identical stream.

  • Use an audio repeater that reads a stream from your USB input and writes it to your USB output. These are commonly included with "virtual audio cable" packages, though those primarily focus on drivers that loop output to input. You want input to output.

    • The repeater tools included with VAC would work; you don't need the cable part
    • Voicemeeter would also work, but its goal is to mix, so you might not get a bit-perfect stream out of it

The easiest way is probably to just set your video player to use a specific output, and set your USB output as "default". Then you can use Windows' built-in "listen to this device" on the USB input, which will play it to the output. But if you want a bit-perfect stream you'll need to use a repeater tool.

| |
  • One of those "a-ha" moments when I read your answer. Your understanding of my situation is correct. Perhaps I should have just said I have a signal coming from "external hardware" via Toslink. I will use VLC as a "sure thing", but first I'd like to try SMPlayer, which does have WASAPI as an option for AUDIO > Output driver: I never fully understood WASAPI, except that recording apps needed them to reduce latency to improve real time monitoring. How does this compare to AUDIO > Output driver: PCM Now that I'm aware of the big picture here, I can experiment with different settings. – user780774 Oct 19 '17 at 6:41
  • @Ray71 There's a number of different Windows audio APIs, stretching back to the 1990s. WASAPI is the "new" one (since Vista) and the only one with a well-defined exclusive mode (note: WASAPI in non-exclusive mode will still go through the system mixer). There's others like Kernel Streaming that do similar things, but aren't as easy/accessible as WASAPI. Many of these APIs are referred to with multiple names, e.g. waveOut (function name, what VLC calls it) is part of MME (subsystem/API, what VAC and Voicemeeter call it). – Bob Oct 19 '17 at 6:51
  • @Ray71 Wikipedia has a decent overview of most of them: legacy MME & KS, DirectSound, WASAPI and even the third-party ASIO. But at the end of the day it more or less comes down to "WASAPI (shared), then DirectSound, then MME if you have no other choice". And if you want bit-perfect with no mixing, then use either WASAPI exclusive or KS. – Bob Oct 19 '17 at 6:56
  • But when the results are inconclusive, more info helps, so: Of the two ways I could go, advantages or trade-offs between them? I'm leaning towards "Configure the video player..." Anyway the SMPlayer also has a check box for "AC3/DTS pass-through S/PDIF". Hovering on it says "Uses hardware AC3 passthrough. NOTE: none of the audio filters will be used when this option is enabled." (pop-up is just as cryptic as the check box!) I don't understand the term "passthrough". My experience is with MIDI to the IN jack, and then unchanged to PASSTHROUGH jack to daisy chain another device. But here, – user780774 Oct 19 '17 at 6:59
  • there's nothing passing through SMPlayer – user780774 Oct 19 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy