audio_jungle wrote:Based on what I have seen today, it also appears that the *hijacked* audio is ultimately allowed to continue on its way to the System output. And this is why when I add Firefox as an "audio source" in Loopback, and I have my System > Output set to my Internal Speakers/USB Headset that I can listen to the streaming radio on Firefox while Loopback makes it available to other applications like Audacity, right?
So... Yes, but not *quite* :)
It's a *little* more complicated than that (for good reasons), because Loopback is trying to help you not make routing mistakes, such as routing the same audio multiple times through to the same output etc.
Let's try and explain Loopback's behaviour with an example.
So, let's say you have audio playing in Firefox, which is going to the system output as per normal operation.
You then enable Loopback, and have Firefox as a hijacked source. Audacity is not running.
At the moment Firefox is still playing to your system output (either Loopback is hijacking Firefox, and passing it on to the system output by default, *or* Firefox hasn't *technically* been actually hijacked yet, it's impossible to know how Loopback is programmed, we can just observe the behaviour). But the bottom line is that, at this moment, Firefox audio so far isn't doing anything beyond normal.
desmond wrote:*But* - as soon as you have another application that's set to receive audio from Loopback (eg, you run Audacity which has Loopback set as it's audio input), Loopback now knows it's "in use" and has to divert the audio away from it's regular use, and instead pass it through Loopback, so it can be recorded to Audacity.
(Verified by me sticking meters at various points in the signal path and observing what audio is being passed around when.)
How exactly did you put meters in between these virtual parts?
desmond wrote:Ok. So what's our path to *hearing* Firefox, under these conditions?
In Loopback, if "Mute audio sources" is checked, Firefox will *only* send to Loopback (while active of course), but if it's unchecked, Firefox will *also* be sent to the normal system output path as well. You can think of this as the Firefox audio is sent *both* to Loopback, and the system output. The checkbox only works when hijacking is taking place (ie, when another app is listening to the Loopback input), otherwise it does nothing. It's normally best left on.
And the second "Monitor Through" option lets you choose *another* output device to monitor to, in addition to the path above. Leave this off for now, you likely won't need it.
desmond wrote:Note: The manual explains both these checkboxes in a straightforward enough manner, and also says that enabling the Monitor Through checkbox will *always* make Loopback active/in use *even if no apps are using the Loopback device*. I mention this just to be thorough about the above behaviour - like I say, just forget about the second option for now.
On what page of the PDF is that?
Taking into consideration what you said above, here is what I observe...
These are my current settings...System Preferences:
Input > Logitech USB Headset
Output > Logitech USB HeadsetLoopback
Virtual Device > vHeadset+Firefox
- Logitech USB Headset
Mute audio sources > checked
Monitor audio through > uncheckedAudacity
Playback Device > Logitech USB Headset
Recording Device > vHeadset+FirefoxFirefox
Playing streaming audio...
- I am wearing my USB headset.
- Firefox is on, and pointing to http://www.cifm.com
- Audacity is off.
- My Loopback virtual device is unchecked.
- I can hear music from the online radio station.
- If I enable my Loopback virtual device, there are no changes.
- Next, I launch Audacity.
- I can still hear the stream.
- I open an Audacity project.
- I can still hear the stream.
- I press "Record" in Audacity...
- The music in my headset is shut OFF.
- I can see "signal" being recorded in Audacity, though.
- I go to Loopback, and uncheck
"Mute audio sources"
- I can now hear the stream again.
If I had to guess, this is how things work...
When Loopback is out of the equation, then streaming radio from Firefox is passed to macOS and then to your hardware, where you hear it on your defined "Output", e.g. Internal Speakers, Headphones, USB Headset, External Speakers.
When a virtual device is created in Loopback and turned on, Loopback *inserts* itself between any applications (e.g. Firefox) and macOS and your hardware.
As such, signal is NOT going directly from Firefox to macOS and your hardware anymore.
If the application defined in "Audio Sources" is NOT actively pulling the *hijacked* signal from Loopback's virtual device, then Loopback presumably passes along the signal from Firefox to macOS and your hardware.However, if the application defined in "Audio Sources" is ACTIVELY pulling the *hijacked* signal from Loopback's virtual device, then a few things happen...
1.) Loopback now passes along the *hijacked* signal from the audio source (e.g. Firefox) to the application using the virtual device as an "input" (e.g. Audacity).
2.) Loopback looks at its own settings
3.) If "Mute audio sources" is checked, then Audacity still gets the *hijacked* signal, but the signal is NOT passed along to macOS and your hardware, so you can see things being captured in Audacity, but cannot hear them!
And if "Mute audio sources" is UN-checked, then Audacity still gets the *hijacked* signal, and it it also passed along to macOS and your hardware, so that you can hear what Audacity is capturing!It should be noted that the moment the application which is requesting the signal from Loopback stops recording, Loopback flips the "switch" back to where it is receiving signal from Firefox, HOWEVER, it is immediately passing it along to macOS and your hardware.
(So, stopping recording in Audacity yields the same effect as unchecking "Mute audio sources"...)
Whether Loopback "interrogates" that incoming signal, or simply passes it along to macO and your hardware is a function of whether Loopback determines if another application is requesting the signal it has "hijacked*.
I believe what I just described is consistent with what you said above...
How does that sound?
desmond wrote:However, there is also yet *one more* monitor pathway - Audacity is receiving audio from Loopback, but it itself probably has the system output set as it's output. If Audacity is set to monitor sources, then it will pass incoming audio through to it's output so you can hear it.
Audacity has a "Playback Device" but not a "Monitoring Device".
So, yes, if I have...
System Preferences > Sound > Output > USB Headset
Audacity > Preferences > Playback Device > Built-in Output
Then in Loopback, if "Mute audio sources" is unchecked, I will hear the stream in my USB Headset on real-time.
Later, if I want to go back and listen to the recroded stream in Audacity, then I will hear it on my laptop's speakers - and NOT my USB headset - as that is how Audacity is set up.
desmond wrote:This is why your monitoring options are useful, as it's all to easy to, for example, have Loopback passing your audio to the system output, and also have Audacity passing a copy of it to the system output, leading to not so nice results.
I suppose that could happen when you playback your audio in Audacity, yes.
desmond wrote:I'd suggest the easiest way to proceed is to leave "Mute Audio Sources" checked in Loopback, and monitor via Audacity (but you can if you prefer do it the other way around.)
As mentioned above, you cannot do that.
Audacity only allows you to define a "Playback Device" which cannot be used to listen as you actually record things.
As such, I would need to use one of these approaches...
a.) Mute audio sources > un-checked
Monitor audio through __________ > un-checked
b.) Mute audio sources > checked
Monitor audio through __________ > checked
c.) Mute audio sources > un-checked
Monitor audio through __________ > checkedI tried all 3 options above, and for some strange reason, they all yield acceptable results?!
(Maybe because I split the audio source and put Firefox on two channels and my USB Headset on two separate channels that makes a difference?)
If I had to guess, I would think Option-A above is the "cleanest" approach.
What do you think??
desmond wrote:Hopefully I'm clear enough in explaining this - but if at any stage you're not sure what I'm saying, just let me know and I'll try to be clearer.
Much better than Rogue Amoeba's support... :mrgreen:
audio_jungle wrote:Thank God for experts on the Internet like you who are willing to take time to help out a stranger!!
No worries - that's what makes the internet (and this forum in particular) so cool!. We all benefit from learning from others and I'm sure others reading this thread struggling with similar issues will hopefully find something useful too.
Although frustrating in the beginning, I am finding all of this SUPER INTERESTING, and I am eagerly awaiting the day when I have a successful podcast online. (Understanding that great sound engineering is only part of the equation!)