nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

Getting raw audio data from parec

Wed Dec 26, 2012 7:45 pm

Hi everyone,

I set up a mpd and it works fine. Now I am trying to record the raw audio data while playing with parec but that seems to fail. On the screen appears nothing and when I pipe the output into a file there is just an endless bunch of "^@".

Any suggestions? Thanks!

nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

Re: Getting raw audio data from parec

Thu Dec 27, 2012 1:25 pm

Maybe it has something to do with this? :

Code: Select all

pi@raspberrypi ~ $ arecord --list-device
**** List of CAPTURE Hardware Devices ****
When I run "pactl list" I got the following sourcd-entry:

Code: Select all

Source #0
	State: IDLE
	Name: alsa_output.platform-bcm2835_AUD0.0.analog-stereo.monitor
	Description: Monitor of bcm2835 ALSA Analog Stereo
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 4
	Mute: no
	Volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	Base Volume: 100%
	             0.00 dB
	Monitor of Sink: alsa_output.platform-bcm2835_AUD0.0.analog-stereo
	Latency: 0 usec, configured 99954 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of bcm2835 ALSA Analog Stereo"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "bcm2835 ALSA"
		alsa.long_card_name = "bcm2835 ALSA"
		alsa.driver_name = "snd_bcm2835"
		device.bus_path = "platform-bcm2835_AUD0.0"
		sysfs.path = "/devices/platform/bcm2835_AUD0.0/sound/card0"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Formats:
		pcm
but sometimes the name is just auto_null.monitor (even while playing)

nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

Re: Getting raw audio data from parec

Fri Dec 28, 2012 11:35 am

I found the solution. I needed to specify the server so I specified localhost:

Code: Select all

parec --server=127.0.0.1

Return to “Troubleshooting”