Re: [pulseaudio-discuss] sound volume for recording

2016-09-29 Thread Tanu Kaskinen
On Wed, 2016-09-21 at 20:05 +0200, Istvan Gabor wrote:
> I have another question:
> 
> I am puzzled by stream/sink names in pavucontrol window.
> 
> For example in the playback tab I have:
> 
> Virtual Sink Stream from Virtual Sink pizza on Built-in Audio Analog Stereo 
> on _Built-in_Audio_Analog_Stereo_
> 
> AND
> 
> ALSA plug-in [plugin container]: ALSA Playback on 
> _Virtual_Sink_pizza_on_Built-in_Audio_Analog_Stereo_
> 
> The underlined parts are in a button on the right.
> 
> What do these definitions/descriptions exactly mean?

module-virtual-sink connects to the master sink by creating a stream.
This stream has description "Virtual Sink Stream from Virtual Sink
pizza on Built-in Analog Stereo". The stream description is generated
using this pattern: "Virtual Sink Stream from ". The virtual sink description in turn has pattern
"Virtual Sink  on ". You configured
the virtual sink name to be "pizza", and the master sink description is
"Built-in Audio Analog Stereo". The awfully long stream description is
a combination of all these.

The second stream description is for an alsa application stream. Those
streams use "ALSA plug-in []: ALSA Playback" as the
description (the description is set by the alsa plugin that connects
alsa applications to pulseaudio). I assume you're playing Flash content
in a browser. "plugin container" is a string that the browser has set
as the Flash plugin process name.

-- 
Tanu
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] sound volume for recording

2016-09-21 Thread Istvan Gabor
Tanu Kaskinen írta:
>On Sat, 2016-09-17 at 13:53 +0200, Istvan Gabor wrote:
>> Hello:
>> 
>> I record sound from flash stream using pulseaudio.
>> This is the command I use for recording sound:
>> pacat --record -d alsa_output.pci-_00_06.0.analog-stereo.monitor
>> | sox -t raw -r 44100 -s -L -b 16 -c 2 - "output.wav".
>> 
>> I use pavucontrol to control sound volumes for recording and playing
>> the sound.
>> In playback tab: ALSA plugin volume; in Recording tab: pacat: pacat
>> from Monitor of Built-in Audio Analog Stereo; in Output devices tab:
>> Built-in Audio Analog Stereo Port: Line Out (plugged in).
>> 
>> The problem is when I change the output volume in the output tab
>> (Output devices tab: Built-in Audio Analog Stereo Por) it changes the
>> recording volume too, therefore I can't change the listening volume
>> level when I record sound.
>> 
>> How could I make recording volume independent from the output volume
>> I listen to?
>
>Maybe this would work:

Thank your for your answer.

>pactl load-module module-virtual-sink sink_name=pizza 
>master=alsa_output.pci-_00_06.0.analog-stereo use_volume_sharing=false
>
>That will load a virtual sink that forwards the audio to the alsa sink.
>The virtual sink will have its own monitor source that isn't affected
>by the alsa sink volume.

I see. I did it.

>Move the flash stream to the pizza sink and record from pizza.monitor,
>and when you need to change the output volume, use the alsa sink for
>that.

OK, I moved the stream to pizza as follows:

Get the alsa plugin/flash stream index by:

pacmd list-sink-inputs
2 sink input(s) available.
index: 2
...
sink: 0 

That is I have to move index 2 to pizza:
pactl move-sink-input 2 pizza

Now I have 2 playbacks: virtual sink stream and alsa-plugin, and I have two 
outputs: line-out (plugged in) and virtual sink pizza.

I can record from pizza.monitor:

pacat --record -d pizza.monitor | sox -t raw -r 44100 -s -L -b 16 -c 2 - 
"output.wav"

Now I can change line out output volume without affecting recording volume.

That's what I wanted. Thanks!

I have another question:

I am puzzled by stream/sink names in pavucontrol window.

For example in the playback tab I have:

Virtual Sink Stream from Virtual Sink pizza on Built-in Audio Analog Stereo on 
_Built-in_Audio_Analog_Stereo_

AND

ALSA plug-in [plugin container]: ALSA Playback on 
_Virtual_Sink_pizza_on_Built-in_Audio_Analog_Stereo_

The underlined parts are in a button on the right.

What do these definitions/descriptions exactly mean?

Thanks,

Istvan

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] sound volume for recording

2016-09-18 Thread Tanu Kaskinen
On Sat, 2016-09-17 at 13:53 +0200, Istvan Gabor wrote:
> Hello:
> 
> I record sound from flash stream using pulseaudio.
> This is the command I use for recording sound:
> pacat --record -d alsa_output.pci-_00_06.0.analog-stereo.monitor
> | sox -t raw -r 44100 -s -L -b 16 -c 2 - "output.wav".
> 
> I use pavucontrol to control sound volumes for recording and playing
> the sound.
> In playback tab: ALSA plugin volume; in Recording tab: pacat: pacat
> from Monitor of Built-in Audio Analog Stereo; in Output devices tab:
> Built-in Audio Analog Stereo Port: Line Out (plugged in).
> 
> The problem is when I change the output volume in the output tab
> (Output devices tab: Built-in Audio Analog Stereo Por) it changes the
> recording volume too, therefore I can't change the listening volume
> level when I record sound.
> 
> How could I make recording volume independent from the output volume
> I listen to?

Maybe this would work:

pactl load-module module-virtual-sink sink_name=pizza 
master=alsa_output.pci-_00_06.0.analog-stereo use_volume_sharing=false

That will load a virtual sink that forwards the audio to the alsa sink.
The virtual sink will have its own monitor source that isn't affected
by the alsa sink volume.

Move the flash stream to the pizza sink and record from pizza.monitor,
and when you need to change the output volume, use the alsa sink for
that.

-- 
Tanu
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] sound volume for recording

2016-09-17 Thread Istvan Gabor
Hello:

I record sound from flash stream using pulseaudio.
This is the command I use for recording sound:
pacat --record -d alsa_output.pci-_00_06.0.analog-stereo.monitor | sox -t 
raw -r 44100 -s -L -b 16 -c 2 - "output.wav".

I use pavucontrol to control sound volumes for recording and playing the sound.
In playback tab: ALSA plugin volume; in Recording tab: pacat: pacat from 
Monitor of Built-in Audio Analog Stereo; in Output devices tab: Built-in Audio 
Analog Stereo Port: Line Out (plugged in).

The problem is when I change the output volume in the output tab (Output 
devices tab: Built-in Audio Analog Stereo Por) it changes the recording volume 
too, therefore I can't change the listening volume level when I record sound.

How could I make recording volume independent from the output volume I listen 
to?

Thanks,

Istvan

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss