Creating multiple pulseaudio profiles

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Creating multiple pulseaudio profiles

Postposted on Tue Nov 12, 2013 8:37 pm

I'm usint Ubuntu 12.04 LTS, and I find myself consistetly editing the daemon.conf file in the etc/pulse/ folder. My computer isn't very powerful so for smooth video playback and FPS games, I need to set the sound to a 48000 Hz sample rate. For music, I re-edit it and set it to 192,000 Hz. I leave the resampler at src-sinc-best-quality and the bit settings at 24 bit. Of course every time I want to change the setting, I have to manually edit it and reboot. I do this several time a day sometimes. Is there a way to set up multiple profile so I can easily switch between 48,000 Hz and 192,000 Hz with minimal effort and without having to reboot? Maybe a GUI utility?
Posts: 63
Joined: Tue Nov 15, 2011 12:50 am
Location: Potato State

Re: Creating multiple pulseaudio profiles

Postposted on Tue Nov 12, 2013 8:47 pm

Hrm... I avoid pulseaudio like the plague* but this link might provide helpful background information even if it isn't addressing exactly the same issue you have: ... t-devices/

If you don't mind me asking... is there really any benefit to a 192KHz sampling rate? Especially since you are describing your system as not being very powerful? Have you had someone give you blind listening tests where you can actually pick out the 192KHz audio over a lower sampling rate reliably?

* Weird because I like systemd quite a bit and the same dude writes both programs...
4770K @ 4.7 GHz; 32GB DDR3-2133; GTX-770; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
Gerbil Elite
Gold subscriber
Posts: 708
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: Creating multiple pulseaudio profiles

Postposted on Tue Nov 12, 2013 9:39 pm

You're wasting your time by playing back at 192 kHz, unless somehow your editor won't edit at the higher freq without output also being there. There's no chance you can hear the difference in straight playback if that's why you're doing it.

Even 24-bit/48kHz is pushing it as far as what you can hear unless you've got really good speakers or headphones and good source material.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
Grand Gerbil Poohbah
Posts: 3394
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Creating multiple pulseaudio profiles

Postposted on Tue Nov 12, 2013 9:53 pm

Unless your source material is 192kHz and you've got really good speakers or headphones the benefits are marginal at best.

That said, you really shouldn't need to do a full reboot. Just killing and restarting the PulseAudio daemon after switching the config should be enough (it may even restart automatically when killed; I know some versions of Ubuntu did this). You could write a little script that copies a specified profile to daemon.conf, then kills (and re-starts if necessary) the daemon.

As an aside, my own audio config for Ubuntu 12.04 is a little bizarre. I run JACK as the primary audio stack, with PulseAudio feeding into it through a PulseAudio-to-JACK adapter module. The upside is that I can apply different EQs to the speaker and headphone jacks (can't afford high end speakers/headphones, so the EQ really is needed to get things sounding halfway decent), and the system plays nice with music software like Rosegarden, Qsynth, and jack-rack (for effects). The only issue I've noticed with this setup is that audio on web videos can sometimes be slightly out of sync (probably due to latency of the PulseAudio-to-JACK interface), but this has gotten significantly better on recent versions to the point where I don't notice it most of the time.
The years just pass like trains. I wave, but they don't slow down.
-- Steven Wilson
just brew it!
Gold subscriber
Posts: 39825
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Creating multiple pulseaudio profiles

Postposted on Tue Nov 12, 2013 11:11 pm

It does make a difference on my sound card even if the source material is a low sample rate. It's an Asus Xonar Essence ST. On windows, setting the sample rate to 192000 Hz also tells the sound card to do some internal processing which improves the sound quality. Amazingly, setting PulseAudio to 192000 Hz also affects the sound quality. It isn't placebo. There is definitely a HUGE difference, even on youtube videos with a supposed sample rate of 48000 Hz. Whether or not it is enabling the internal processing the same on windows, there is definitely a noticable difference. Although setting pulseaudio to 192000 also taxes my Core 2 Duo, so obviously my sound card is not fully hardware accelerated. I will try to track down a script or something. Maybe there is a way to make two daemon.conf files and switch between them and restart the daemon with a simple script. I'm not a fan of pulseaudio either. I prefer ALSA, but trying to remove pulseaudio and make alsa the default on Ubuntu tends to break things. I really don't have the expertise to switch to a different distro conveniently. I've used Debian before, but I always end up wanting to bang my head against the wall after trying to make something work right. On a side note, one of the most significant things you can edit in daemon.conf is the resample-method. I've found src-sinc-best-quality to be the best setting, but it is also the most processor-demanding setting I believe.
Posts: 63
Joined: Tue Nov 15, 2011 12:50 am
Location: Potato State

Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 2 guests