Will a media player running both audio & video through the HDMI port be heard on USB soundcard?

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.

user780774

Posted 2017-10-18T03:43:43.980

Reputation:

Answers

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.

Bob

Posted 2017-10-18T03:43:43.980

Reputation: 51 526

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. – None – 2017-10-19T06:41:19.880

@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 – 2017-10-19T06:51:56.810

@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 – 2017-10-19T06:56:38.640

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, – None – 2017-10-19T06:59:51.920

there's nothing passing through SMPlayer – None – 2017-10-19T07:01:17.443

@Ray71 Unfortunately, I don't know much about DTS, but I assume it means instead of sending a standard PCM stream through the OS audio APIs, it sends DTS-encoded data that must be supported by and decoded on the receiving end. This also assumes your video has a DTS-encoded audio track in the first place. In this case, "passthrough" can mean "from the video file to the output device", without decoding into plain PCM. I'm not sure how that meshes with Windows APIs, but a cursory search implies it uses a custom driver? – Bob – 2017-10-19T07:03:41.197

All your help has been incredibly helpful; I'll try to now learn more on my own [starting with your Wikipedia referral] before I start overflowing with infinite questions :) – None – 2017-10-19T07:05:23.677

@Ray71 Of the two, the video player is easier to configure. Personally, I would do both — but it really depends on whether you care about getting a bit-perfect stream on the USB in/out; if not, use the default "listen to" with default mixer, if yes then you'll need to find a third-party repeater that uses an exclusive mode. Anyway, yes, this is getting a bit long - but you can find me in chat if you want to discuss further.

– Bob – 2017-10-19T07:06:41.673