You are not logged in.

#1 2012-01-15 17:35:41

cthulhufhtagn
Member
Registered: 2006-07-31
Posts: 20

No sound in flashplugin when using ALSA Loopback as capture device

Hello.

I own an Intel HDA soundcard so my driver doesn't support using Mix as a capture device, hence using snd-aloop. When I try:

mplayer -ao alsa:device=hw=1,0 soundfile.mp3

I can use the loopback capture device in any app (Audacity, Skype, ...) but flashplugin. The Loopback device shows up in flashplugin but no sound is detected whatsoever. My microphone, however, works just fine.

I thought it could be a sensivity problem, so I added a softvol device, but the result is the same.

mplayer -ao alsa:device=aduplex soundfile.mp3

This works everywhere but in flashplugin.

This is my current .asoundrc

# ------------------------------------------------------
# hardware 0,0 : used for ALSA playback
pcm.loophw00 {
  type hw
  card Loopback
  device 0
  subdevice 0
}

# ------------------------------------------------------
# playback PCM device: using loopback subdevice 0,0
# Don't use a buffer size that is too small. Some apps 
# won't like it and it will sound crappy 

pcm.amix {
  type dmix
  ipc_key 219345
  slave.pcm loophw00
}

# ------------------------------------------------------
# software volume
pcm.asoftvol {
  type softvol
  slave.pcm "amix"

  control { name PCM }

  min_dB -30.0
  max_dB  30.0
}

# ======================================================
# ------------------------------------------------------
# hardware 0,1 : used for ALSA capture
pcm.loophw01 {
  type hw
  card Loopback
  device 0
  subdevice 1
}

# ======================================================
# ------------------------------------------------------
# duplex device combining our PCM devices defined above
pcm.aduplex {
  type asym
  playback.pcm "asoftvol"
  capture.pcm "loophw01"
}

# ------------------------------------------------------

My flasplugin version is extra/flashplugin 11.1.102.55-1 for 64 bit platform. If you would like to know any further information, let me know.

Offline

#2 2012-01-16 01:14:41

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: No sound in flashplugin when using ALSA Loopback as capture device

I don't have a solution but are you trying to save audio captured from Flash? Another way to do it is mentioned in one of ubuntu's guides https://wiki.ubuntu.com/PulseAudio#Reco … d_Audacity.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#3 2012-01-16 02:29:24

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: No sound in flashplugin when using ALSA Loopback as capture device

cthulhufhtagn wrote:

# Don't use a buffer size that is too small.

Indeed. So, what's your buffer size? See it with:

cat /proc/asound/card0/pcm0p/sub0/hw_params

When you're actually using ALSA, of couse.

I would suggest using the same as me:

$ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 6
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 8192

Offline

#4 2012-01-16 05:05:54

cthulhufhtagn
Member
Registered: 2006-07-31
Posts: 20

Re: No sound in flashplugin when using ALSA Loopback as capture device

ConnorBehan wrote:

I don't have a solution but are you trying to save audio captured from Flash? Another way to do it is mentioned in one of ubuntu's guides https://wiki.ubuntu.com/PulseAudio#Reco … d_Audacity.

No. I'm not trying to save audio captured from flashplayer, but to stream audio through it. Also I don't want to use jack or pulseaudio unless I have no other choice. The alsa loopback device is working just fine in every other application, just not in flashplayer.

brebs wrote:
cthulhufhtagn wrote:

# Don't use a buffer size that is too small.

Indeed. So, what's your buffer size? See it with:

cat /proc/asound/card0/pcm0p/sub0/hw_params

When you're actually using ALSA, of couse.

I would suggest using the same as me:

$ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 6
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 8192

Loopback playback device (using the aduplex device):

>: cat /proc/asound/card1/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 6000
buffer_size: 18000

Loopback capture device when opened by flashplayer:

>: cat /proc/asound/card1/pcm0c/sub0/hw_params 
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 1
rate: 48000 (48000/1)
period_size: 512
buffer_size: 8192

Offline

#5 2012-01-16 07:48:10

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: No sound in flashplugin when using ALSA Loopback as capture device

Oh so there is a Flash app that takes audio input from sources such as a mic? And you are trying to make it take input from the loopback device (sound playing on your system) instead?

Sorry for the unhelpful curiosity.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#6 2012-01-16 08:24:08

cthulhufhtagn
Member
Registered: 2006-07-31
Posts: 20

Re: No sound in flashplugin when using ALSA Loopback as capture device

ConnorBehan wrote:

Oh so there is a Flash app that takes audio input from sources such as a mic? And you are trying to make it take input from the loopback device (sound playing on your system) instead?

Sorry for the unhelpful curiosity.

Yeah, that's exactly what I'm trying to do. As I said, the loopback device works fine in Audacity or Skype. In Flash, however, the loopback device is detected but no activity is detected (no sound whatsoever). I tried with several flash sites and all of them show the same behaviour with the loopback device.

Offline

#7 2012-08-28 05:51:17

Azathoth
Member
Registered: 2011-05-20
Posts: 6

Re: No sound in flashplugin when using ALSA Loopback as capture device

Bumping the thread.

I have the same exact problem. I have a loopback set up in ALSA. If I play audio to the loopback device, I can record from the device in audacity and arecord just fine. In Flash, I can see the loopback device(s), but I can't get any input from it.

I've searched high and low for an answer and come up empty.

Offline

Board footer

Powered by FluxBB