LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-30-2024, 08:19 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
what does Firefox use for audio output/playing


suppose you connect to an internet radio station or view a video (with audio) from a wed site like YouTube with a web browser like Firefox. you do this through a firewall that restricts inbound connects in most cases (it might have logic to let you do insecure file transfers with FTP).

there are multiple ways for a process to output audio to the local speakers or audio system. what does Firefox do? which of many APIs does it use?

i am wanting to capture the audio Firefox, or any client program, is trying to play to me. normally Firefox is work fine for me. i want to set up (implement) a way to send that audio to another computer that has a special audio system attached.
 
Old 03-30-2024, 08:47 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
It would appear to be something called Audio Worklets.
 
1 members found this post helpful.
Old 03-31-2024, 02:43 AM   #3
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
You can capture application audio both at pulse and alsa: https://trac.ffmpeg.org/wiki/Capture/ALSA, https://trac.ffmpeg.org/wiki/Capture/PulseAudio.
 
1 members found this post helpful.
Old 03-31-2024, 10:42 PM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by lvm_ View Post
You can capture application audio both at pulse and alsa: https://trac.ffmpeg.org/wiki/Capture/ALSA, https://trac.ffmpeg.org/wiki/Capture/PulseAudio.
these documents are describing how to capture audio from a hardware device, presumably input audio like a microphone i want to capture the audio a process is trying to play (to speaker or to ear buds depending on the setup). my thinking is to emulate some audio playback hardware or emulate the API that some library creates for programs to their output thing with (maybe via a client library ... that i would be inclined to emulate).

emulating speaker hardware is likely very difficult for a non-root user. emulating a library API is likely much easier, although not trivial.
 
Old 04-01-2024, 12:54 AM   #5
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Quote:
Originally Posted by Skaperen View Post
these documents are describing how to capture audio from a hardware device
Ah... If you tried, like, reading them, or at least scrolling to the end glancing at headings... Spoiler: it's in examples.
 
Old 04-02-2024, 03:10 PM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by lvm_ View Post
Ah... If you tried, like, reading them, or at least scrolling to the end glancing at headings... Spoiler: it's in examples.
which would you recommend using? it looks like there will be a lot of work getting things working (needed modules are missing and packages either won't install or can't be found) so i want to focus until i get something to work. it would be nice to have some examples that can work with what a distro like Ubuntu has in it so nothing new needs to be installed. that or maybe a "winsound" emulator for Linux.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Pulseaudio not working quite right, audio not playing for 6 seconds makes audio stop working HaYtReZ Linux - Newbie 2 10-19-2023 03:50 AM
Audio issue -system keeps swapping between devices when audio file is playing? joden1 Linux - General 5 09-23-2021 03:44 PM
Pavucontrol shows that audio is playing but no output heard overclock351 Linux - Newbie 5 03-11-2021 12:29 AM
Audio not working..no output while playing vambhan Linux - Newbie 7 03-09-2009 06:37 AM
Fedora _64, RealPlayer, firefox and playing audio from BBC otto k Fedora 2 08-29-2006 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration