JACK, LADSPA, AAC
July 12, 2009 —
BarryK
JACK
Happypuppy, where did you get this from:
Aqualung (compiled without JACK) supports playback samplerates/bitdepths only up to 16bit/48kHz.
To satisfy the audiophiles with higher-end sound cards (i.e. to enable higher-quality output modes like 24bit/96kHz), you'll have to compile it with JACK support so they can use JACK for the audio output.
Audiophiles will just need to install an additional JACK .PET package.
Without the JACK package, aqualung will simply fall back to the default ALSA output.
ALSA is not limited to 48KHz. I just did a test, I resampled the "2barks" file in Sweep at 96000Hz, saved it, played it, no problem.
However, I played the same 96000Hz 2barks in Aqualung and it stated the actual playback is at 44000Hz. I tried starting aqualung with:
# aqualung -r 96000 -o alsa
...but it gave an error.
Then I tried:
# aqualung -r 96000 -o oss
...which works.
That last one is using the OSS emulation of ALSA.
JACK is a sound server, and any sound server makes me cringe. Linux went through that horrible phase where people tried to solve sound problems by installing sound servers. The KDE people use aRTs but they are now moving away from it.
Some comments I have found why JACK is used (http://forum.freespire.org/showthread.php?t=440&page=2):
The primary reason jack is used at all is because there needs to be some way for multiple applications to share the sound card. The problem is, OSS and ALSA only allow one application at a time to talk to the sound card. So, for example, you would not be able to listen to mp3s and get email notification sounds at the same time.
...but, I'm not sure if that is correct. From what I have read, ALSA can share the card.
I went to the official JACK website to see if they could sell me on the idea that JACK is essential, or at least somewhat desirable. The features seem to me to be really esoteric, and I am not sold on it.
LADSPA
The Aqualung site states that the 'liblrdf' package is needed, as well as the ladspa header file, to support LADSPA -- ok, I'll check that out, see if it's a small library.
AAC
The ffmpeg I have in 416 is the same as in pup 4.1.1. It's an old version of ffmpeg, as I have had trouble with later versions. I can't recall the exact details right now, but I found the older ffmpeg played some media files better.
Anyway, AAC support in ffmpeg goes a long way back, so it is probably just a matter of configuring it right. A quick read, I see that libfaad2 is needed to support AAC in ffmpeg, so I'll check that out too.
Comments
His master's voiceUsername: dogone
Wow, Barry. By the time you're finished we'll have to nickname 416, "Hi-Fido", "The Pup with the crystal-clear Woof". Has a nice ring to it.
JACK not essential
Username: tempestuous
"happypuppy, Thanks for the LADSPA/JACK elaboration. I just compiled Aqualung with various options enabled, and did some testing. I can see that JACK would be useful ... but it's completely unnecessary for playing 192kHz wav files. Aqualung just needs to be launched specifying the higher sample rate. See my full report in the main forum - http://www.murga-linux.com/puppy/viewtopic.php?t=44462 Barry, you will see that to successfully launch Aqualung with a higher samplerate you need to add "plughw:0,0" to the end of the command. So is JACK a good thing? Probably. But it's not needed for high samplerate files, and is thus not needed for "high quality" in terms of high samplerates. Of course, "high quality" can be interpreted in other technical terms.
Teaching an old dog
Username: BarryK
"Yes, I would also like to say thanks to happypuppy, tempestuous and ttuuxxx, for looking into this and presenting all the issues to me. LADSPA and JACK were just names to me before. The whole think about sound in Linux is still pretty murky, but you guys have got me going reading up on the subject. See my later post, I have decided to leave out LADSPA and JACK support for Aqualung for now. But, it could be reconsidered, or easily handled by extra PET packages.
Aqualung and AlsaPlayer
Username: happypuppy
"@Barry: Aqualung works fine here with the [code]-r 96000 -o alsa[/code] switch (no OSS emulation). All you need is a decent soundcard :) [b]AlsaPlayer[/b] was the one that had the problem of not being able to play files with samplerates above 48000Hz, unless you use JACK: [code]#alsaplayer --frequency 96000 #frequency out of range (8000-48000)[/code]
About JACK (part 1)
Username: happypuppy
"JACK is not another sound server like aRTs,esd or PulseAudio. It's a specialised audio connection kit for professional audio recordists ,musicians and advanced users Some of the things you can do with JACK: -------------------------------------- - Connect the output of one app to another for recording or further processing, connect multiple ins/outs between multiple apps, record from anything,... - Connect the output of any app to any output of your soundcard, clone the sound and send it to multiple outputs (i.e. play the same thing from all 8 speakers),send different streams to different soundcard outputs and play them all at once - Ultra low latency operation (totally opposite from the other servers out there which add massive latency) Reduces the audio latency of ALSA even further with advanced scheduling. - Minimal overhead (very low CPU usage,unlike all other servers) - On-demand operation (start it only when you need it.No need to run the server all the time)
Re: JACK
Username: BarryK
"Ah, ok. I did lump JACK in with those others. I had done quite a bit of (fairly superficial) reading where the sound servers were heavily criticised, including increased latency.
disciple
Username: ngapawa
"> See my later post, I have decided to leave out LADSPA and JACK support for Aqualung for now. That's a good call, just to save the size - like happypuppy says, it is specialised and unnecessary for most users.
ffmpeg
Username: disciple
"Oops - did it again. > From what I have read, ALSA can share the card. That's right, and these days it does it by default, at least on my machine. But if one of the applications uses oss emulation then it doesn't, which can confuse people, as some applications seem to use oss by default. > A quick read, I see that libfaad2 is needed to support AAC in ffmpeg, so I'll check that out too. It looks like you wouldn't need faac and faad with a current ffmpeg (except for HE files (whatever they are))... which you're not using anyway :)
Tags: woof