![]() If you read about this issue on several pages on the Internet, many people suggest to use the “trivial” resampling method. What is the reason for this? The biggest issue is that the Raspberry Pi CPU is not very powerful and resampling is a relatively complex procedure. This is not a big problem if you use only 44.1 and 48kHz, but if you also want to playback high-resolution music you will run into trouble with the Raspberry Pi. To make sure that different sound sources can be mixed all have to be synchronized to a common sample rate. However there are some issues, the major one is resampling. If Pulseaudio is working correctly, you will see the AO: as output device. Selected audio codec: afm: pcm (Uncompressed PCM)ĪO: 44100Hz 2ch s16le (2 bytes per sample) You will not be able to use your remote control. MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Teamįailed to open LIRC support. This has to be changed later, but it makes debugging much easier. ![]() Now start Pulseaudio: /usr/local/bin/pulseaudio -vvv -system -disallow-exit -disallow-module-loading=1 -high-priority Load-module module-native-protocol-unix auth-anonymous=1 I would recommend to start with a minimal set of modules: #!/usr/bin/pulseaudio -nF Crosscompiling on a PC is much faster, but also much more complicated, therefore I would not recommend this. If you compile it at the Raspberry Pi, you have some time for a coffee. The alsa-module is the most important, but you will also need at least libsamplerate. ![]() Make sure you have everything that you need compiled in. System Config Path: /usr/local/var/lib/pulseĬFLAGS: -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option System State Path: /usr/local/var/lib/pulse System Runtime Path: /usr/local/var/run/pulse It will look like this: prefix: /usr/local ![]() Now check the output of teh configuration process. Now you can get, extract, configure pulseaudio. Note that I did not install the X11 headers as Pulseaudio will run in systems mode. This will install not only these packages, but also a lot of dependencies. Note that you need to install a lot of prerequisites before you start to configure and compile pulseaudio: sudo apt-get install -y libltdl-dev libsamplerate0-dev libsndfile1-dev libglib2.0-dev libasound2-dev libavahi-client-dev libspeexdsp-dev liborc-0.4-dev libbluetooth-dev intltool libtdb-dev libssl-dev libudev-dev libjson0-dev bluez-firmware bluez-utils libbluetooth-dev bluez-alsa libsbc-dev libcap-dev This also allows to use PulseAudio 5 instead of version 2 that it part of the Raspbian distribution. Therefore I decided to build my own pulseaudio package. I was not able to use the “ffmpeg” resampler with it. Unfortunately the Raspbian pulseaudio package does not include some resamplers. It creates an additional abstraction layer that allows different sound sources to use is simultaneously. The solution for this and some other issues is PulseAudio. The I2S sound system allows only exclusive access to the sound subsystem. If you want to have different programs sending their output to the same sound card (like the HiFiBerry DAC+) on the Raspberry Pi you might run into problem.
0 Comments
Leave a Reply. |