Change flash player audio output device - audio

Is there a way to change flash players audio output device? if not, is there a swf player who has this possibility? Thanks!

I had an issue until a few minutes ago regarding this.
Two audio devices are available to my XP box: an iMic USB audio I/O device, in which I have permanently plugged my desktop speakers; and a pair of USB headphones with microphone that I plug in occasionally.
The USB headset would take precedence over the USB iMic for applications because apps appear to access the last device plugged in to a USB port. With this in mind, here was my issue:
I would be listening to some Internettings on my USB headset.
Later, I would want to use my desktop speakers for the Internettings.
This entailed unplugging my headset, shutting down Firefox and opening it up again. Because the desktop speakers are considered the most recently plugged in device, they would be default for plugins.
This is damned annoying, I said to myself, and decided a little hacker mode was in order.
Keeping Firefox open, I used Task Manager to kill the "plugin-container.exe" process. This showed a crash screen on any Flash Player applet in Firefox. Then I unplug the headset, and reload the Web page with the applet. Without restarting Firefox, Flash will then play through my desktop speakers.
If I wish to listen on the headset again, I plug the headset in, kill plugin-container.exe, and reload the page. Wham.
For as rare as I intend to switch audio devices, this will cover up part of the mess Adobe left.

I am 99% sure that setting the audio device used by the flash player is something you would need to do on an OS level. You can change the device that flash uses for microphone and video input from the player's settings, but I don't think you can change audio output.

I have found a solution, at least for the Firefox browser, to direct HTML5 audio to a specific audio device:
https://addons.mozilla.org/en-US/firefox/addon/chaudev/
Note: this is a new Firefox addon waiting to be reviewed developed by a friend of mine.
I have been waiting for this for years.
I wanted to use this when my wife is seeing YouTube on her Chrome browser and me seeing anything like Coursera online MOOC lectures (FF) on the TV which is connected to the pc. I wanted to hear my classes on the headset and my wife on the speakers for YouTube.
I have 2 mouses (one for me, wireless) and have installed a neat program called TeamPlayer which gives multiple cursors (each cursor for each mouse).
So I have now literally the capability of 2 persons working on 1 pc.
And on top of that it works seamlessly with "Enounce Myspeed" for speeding up the video lectures' playback.

Related

Time interval between USB audio card detection and being able to play audio

I'm working on a project where a USB audio card is unplugged and plugged arbitrarily from a computer that will be playing sounds. My software should be playing sound as soon as possible right after the card is plugged in.
In order to detect the USB being connected, I'm using libusb's LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED and LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT events, and it works flawlessly. As soon as the device is connected to the USB port, the event is triggered. Same when it's removed.
The problem I'm facing is that there's a time gap between the moment libusb detects the device, and the moment I can actually start working with the device to play sound. I'm using miniaudio to play a sinewave, but the issue is the same using Qt Multimedia, so I'm guessing it has to do with the backend (ALSA).
I've had to place an explicit wait of around 5/6 seconds after the device is detected by libusb to be able to safely open it with miniaudio, but I'd rather not have that magic number right there.
Is there any other way of knowing when the device is ready? I've tried checking udev but it gets activated at the same time as libusb.

Browsers and Bluetooth Headphones in KDE

My Bluetooth headphones work great with non-browser apps. Zoom, Skype, and VLC are all working fine.
In order to get this working, I went into System Settings > Device Preference > Audio Playback and put the Bluetooth headphones above the Built-In Audio option.
Unfortuantely, when I try to use them with a web browser, the sound just comes through the computer's speaker. This happens with both Firefox and Chrome. I tested on BigBlueButton, Jitsi, and Google Play Music.
How can I fix the playback from the browsers so that it uses the headphones?
I was able to fix this using Pulse Audio Volume Control.
First, I had to start some audio playing on the browser I wanted to use with my headphones. (I used Google Play Music, but anything should work.) Then I ran Pulse Audio Volume Control and in the Playback tab, it included an entry for Firefox.
I clicked on the box to the right of "on", which had the Built-In Audio option. That brought up a drop-down menu, and I chose the headphones I wanted to use.
This choice persists even when playback stops on that browser. I can close the audio-playing tab, then start something else, and it still comes back over the headphones. (I expect I'll have to follow these steps again if the headphones disconnect.)
This setting does not persist across multiple browsers. After setting it up for Firefox, I had to set it up again separately for Chrome (using the same process).

Headphones no sound

Today I've connected my bluetooth headphones(Ausdom M08) with PC(via bluetooth dongle).
When I open Skype or Discord I hear no sound on youtube, browser and so on. It only works on Skype and Discord - bad sound, not stereo.
I checked in Sounds Options and I have Ausdom M08 Stereo and Ausdom M08 Hands-Free. First one is default device and second one is default communication device.
When I try to force Skype and Discord to use that default device for sound output I hear no sound then, too!
What I tried:
-Disabling Hands Free Telephony, but I lose microphone function then.
-Tried to uninstall drivers and install again. Still the same.
-Disabling enhancements and exclusive controls of devices.
Literally I tried everything I found on internet or that I thought it can be.
Nothing works.
So the question is: How to make my PC output Stereo Sound from my headphones and still to be able to use microphone from it?
Thanks
There are a lot of missing information here: What PC dongle are you using? Which windows version?
From what I can see about the tech specs of Ausdom M08, it supports few basic profile (HSP/HFP/A2DP/AVRCP). A2DP profile lets you hear stereo audio (Ausdom M08 Stereo). HSP/HFP lets you use the microphone to Skype, but audio is limited to 8K-16K Hz sampling rate (Ausdom M08 Hands-Free). You can't use both Bluetooth profiles at the same time.
So to answer you question: You can't have stereo audio from your headphone while having microphone input.
There are proprietary codec developed by Qualcomm called aptX, which may support microphone over A2DP. But, you'll have to make sure both transmitter and receiver supports this codec.

How to make A2DP and HSP work simultaneously

I have a bluetooth headset. When connecting it to Windows 10, it installs two profiles in Playback devices list:
Hands-Free. (HSP profile)
Stereo. (A2DP profile)
The Second one (Stereo) is set to be the "Default Device" and the "Default Communication Device" on the system.
When I start any program that uses the mic (recorder, chat, VoIP Calls, gaming, etc.) The sound suddenly stops working And I can only use the mic until I stop the recorder or the call.
To enable the sound again I need to make the Hands-Free (HSP) profile handle both input and output (sound and mic). Unfortunately, HSP gives really poor sound quality.
I want to know If there is a way, using code, I can change Bluetooth behavior so the two profiles work simultaneously. One handles the sound and one handles the mic so I can have high quality sound and use the mic at the same time.
You will probably never find a solution. I had the same problem (I was trying to create a walkie talkie with 2 headsets connected to the same smartphone).
On Windows (but also on Android) you can't access directly to a BT-microphone or BT-speaker because it is automatically detected as BT headset and the OS take the control of the device.
Your app can then access the OS-device and not directly the hardware device. The only OS able to do that was Symbian I think which had the most BT-protocols. On Windows you will probably never be able to do that and on Android you have to write your own A2DP-protocol if you want to access the device directly without OS interference.
So sad...
Luckily, under windows you can define different devices for communications and sound.
So, you have two choices:
Choosing Hands-free for both mic/speaker only for communication (which will switch back to A2DP after the call/teams).
Choosing another mic for communication which allow you to still use the speaker profile even in communication.
That is a bluetooth restriction : A2DP (high quality audio) cannot be use simultaneously with HFP (hands-free profile)

GetUserMedia get computer audio

I'm trying to share the computer's audio via webRTC and GetUserMedia, but I don't know if it is possible to obtain this stream.
On Linux and Firefox, when I request the GetUserMedia with the following constrains
navigator.mediaDevices.getUserMedia({video: false, audio:true})
In the popup I can choose alsa_output.pci and share the computer's audio. But when I tried on Chrome/Chromium or I changed to Windows neither Firefox nor Chrome show me any option to capture the internal audio, only my headset microphone.
Are there any option for the getUserMedia or any workaround to get this audio? I tried all the examples of WebRTC samples and Muaz's examples but no one displayed me this option, only Firefox under Linux.
There's no way to do this from the JavaScript code.
In Windows, you just have to use as input for WebRTC Stereo mix (or Wave out mix on some laptops/sound cards). If you don't have it on your list of recording devices, try to update your sound card driver. If you do have it in the list, but it is marked as Currently unavailable, then right click on it and select Set as Default Device. This would make it available.
If your sound card doesn't support Stereo mix, then you can use something like Virtual Audio Cable.

Resources