Integration of Secret Rabbit Code & OS X via Jack & Qjackctl ... or not?
Jul 13, 2006 at 3:22 AM Thread Starter Post #1 of 8

elvisbot

New Head-Fier
Joined
Jan 23, 2005
Posts
8
Likes
0
Here is another problem that has been eating away at me: has anyone figured out how to integrate Secret Rabbit Code (SRC) into the iTunes' or another audio players output on an OS X (Intel, G5, or G4) system?

I've compiled SRC (libsamplerate0--or libsamplerate when compiled outside of Fink) on OS X via Fink.

I believe the most promising way to integrate SRC into OS X's output is to use the freeware JackOSX (an offshoot of Jack--a low-latency audio server) controlled via Qjackctl (a GUi control panel for jack). Oddly, my Fink compiled jack works better than my JackOSX.pkg install.

I have setup qjackctl utilizing the driver portaudio (jackd -v -R -p256 -m -dportaudio -c2 -r96000 -p16) enables Jack to load and allows me to upsample OS X's audio output to 24/96, but I am unsure what sample rate code it utilizes. Also, I have set it up so jackd runs in realtime and incapable of locking memory--I chose setting because OS X isn't supposed to be able to lock memory (but, maybe this information is outdated). My latency is only .333ms. FYI, I have attached jack's startup output in the text document Jack_Startup_output_drive_portaudio_24_96.txt. As far as I know, the only sample rate library I have installed on this system is SRC or libsamplerate0. Unless I can use a realtime debugger, I won't be able to determine how qjackctl upsamples the audio to 24/96. Any ideas?
confused.gif


When I attempt to start-up jack with the coreaudio driver, jackd fails to load. The same happens when I try to use any other driver in jackd. I have attached the output from my attempt to utilize the coreaudio driver in the form of a text document: jackd_dcoreaudio.txt. I am not sure as to why it fails. CoreAudio is integrated into OS X, isn't it? Maybe there is another CoreAudio driver lurking about, waiting to be compiled and installed.
confused.gif


If jack is not utilizing libsamplerate0, it should be possible, with some programming, to pass on OS X's audio output to jack where it will be upsampled with SRC to 24/96 then redirect to whatever output I choose (E.g. USB, Firewire, speaker, ethernet, etc.). This would require some coding and much research.

I am going to continue my research into coding in jack and SRC; also, I will search for some drivers for CoreAudio, OSS, and ALSA--this stupid thing called work gets in the way of my research. Maybe I’ll post my findings to this thread. I hope I don't have to make my own drivers.
frown.gif


And, in the process, I might figure out how to send 24/94 audio over an Airport Express.

BTW, am I abusing smilies?

Cheers,
-------------------------
Portable & Home rig mixed unintelligibly together:
iMod iPod (or G5 -> Airport Express (optical)-> Benchmark DAC-1) -> RS Emmeline 2 Raptor or RS SR71-> H600/Equinox or k701 (or UM2 w/SR71) - > ears.
Soon: G5 or MacBook? -> I2S modded Airport Express or USB w/IS2 RJ45 mod -> Turbomodded I2S modified Benchmark DAC-1 -> RS Emmeline 2 Raptor -> aforementioned headphone sans the UM2 -> ears.
Other stuff (ICs, etc.): P500 Powerplant, Shunyata Diamondback power cords, generic toslink optical cable, MIT T-2, Blue Jean Audio cables.
 
Jul 13, 2006 at 3:34 AM Post #2 of 8
Well, the portaudio driver will not work unless you have the portaudio libraries and whatnot installed. I know it's in FreeBSD's ports, but I'm not sure if it is in Fink or DarwinPorts.

The coreaudio case looks like it finds a driver, but doesn't have permission to use it. Have you tried running it as root to see if it runs?

I did get jackd working under FreeBSD as a normal user, but the performance was abysmal. I suppose it is another one of those Linux-centric applications.
 
Jul 13, 2006 at 4:16 AM Post #3 of 8
I must have the portaudio libraries installed since portaudio is the only drive that works with jackd.

After examining the Secret Rabbit Code's full api, I am suspicious as to whether jack is utilizing libsamplerate0 or SRC. Why should I be suspicious? Because qjackctl allows various forms of dithering. SRC does not include dithering in its full api (functions used for the processing of streaming audio). Maybe jackd is using another library for the dithering. I do not know.
confused.gif


Actually, SRC shouldn't need dithering because it upsamples the audio to 24 bit. This should eliminate the need for added noise to reduce sound artifacts.

I am probably going start another thread seeking someone who is familiar with jack and ajackctl.

Another outlandish idea would be to embed SRC into a flash chip or mram, use an old processor (or new) and create an external unit whos only function is to upsample audio. Since I haven't studied any electrical engineering, this should be a tremendious project. Yet, I can't imagine it would be too complicated. I could also embed linux within a flash chip or mram as well. I'd salvage an "old" motherboard for the all the essential chips. Installing an RJ45 I2S input and output could be toughest task, especially if the information is proprietary. So many dreams.

Too bad I have to work and go to school, otherwise I'd be all over this.

Cheers,
-------------
No signature at this time.
 
Jul 13, 2006 at 6:06 AM Post #4 of 8
OSS is the driver I need rather than CoreAudio. CoreAudio does not support upsampling to x/96, only 24/48.
frown.gif
Specifically, I need to build or find fink_oss.so and fink_oss.la. I have found liboss, which "is a sound API to provide OSS support in ... OS X."

This is getting tougher with each breath.

Malus, could you tell me about your experience with Jack?

Cheers.
----------
Signature not available.
 
Jul 17, 2006 at 6:19 AM Post #5 of 8
I guess I was wrong. CoreAudio can pass 24/96. Something about Jack's coreaudio driver is interfering with coreaudio's innate capacity.

I believe I am going to switch over to a audio programming forum. More code heads over there, where ever there might be.

----
Signature not available at this time.
 
Jul 17, 2006 at 4:35 PM Post #6 of 8
I know that that the old SRC was not compatible with the new 0.9.X versions of Foobar200, so Erik deCastro Lopo was forced to rewrite some of SRC to make it compatible. The new version works, thanks Erik. I licensed SRC from him. However, it was no small feat to make it work. The Foobar2K API changed significantly I gather. I'm no hacker, so I dont know what I'm talking about, but it was a LOT of work for Erik.

To port this to MAC is probably a much larger task. The API is probably much different than PC. Erik could probably handle it, but he would have to have a cash incentive. Anyone want it real bad???
 
Jul 17, 2006 at 8:58 PM Post #7 of 8
Quote:

Originally Posted by elvisbot
OSS is the driver I need rather than CoreAudio. CoreAudio does not support upsampling to x/96, only 24/48.
frown.gif
Specifically, I need to build or find fink_oss.so and fink_oss.la. I have found liboss, which "is a sound API to provide OSS support in ... OS X."

This is getting tougher with each breath.

Malus, could you tell me about your experience with Jack?

Cheers.
----------
Signature not available.



Well, my experience was pretty dismal. While it did work, it did not work well. The sound constantly dropped and there was quite a bit of static. I think it's an issue with the way it achieves such a low latency. I think it uses some functionality specific to Linux, so when running it under FreeBSD there is not necessarily a suitable equivalent, leading to a variety of performance issues. I'll have to play with it again though; maybe I'll try it when I get home tonight. I was using FreeBSD's OSS driver (not 4Front's proprietary version), so I cannot vouch for portaudio or alsa.
 
Jul 18, 2006 at 3:25 AM Post #8 of 8
Well, I tried jackd again tonight. Again, it was still unusable as a user with the oss driver. The portaudio driver didn't work at all. When trying to run it with realtime priority as root, the program consistently crashed. Overall, not very promising. I can get sound, but it constantly drops out. Also, it greatly slows down my machine, which is an AMD Opteron 148 2.2 GHz with 2 gigs of RAM. Seems to be something seriously wrong with it.
 

Users who are viewing this thread

Back
Top