InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Audio tricks or more like when aggregate devices fail... (http://infinitemac.com/showthread.php?t=1645)

Dies 11-28-2008 08:53 PM

Audio tricks or more like when aggregate devices fail...
 
I don't know if this is specific to my hardware/circumstances or if others are in the same situation but I figured the theory might help someone else who is looking to do the same thing or something similar.

The info, at least for me was hard to come across, and when I finally found the solution it was very outdated. I would have liked to reference the thread here anyways but unfortunately I can't find it again... :D

So for me one of the major drawbacks regarding OS X on non-standard hardware was that while every other major OS, as long as drivers are available, has no problem whatsoever automatically sending audio to every output available at the same time, it seems OS X handles this very differently, it may be a much better framework than others when the expected components are there, but in this case it wasn't being very friendly.

After patching HDA built-in sound was recognized and everything I needed worked well, headphone, line out, S/PDIF, microphone. Nice. So now I just needed to have sound going to both line out and S/PDIF at the same time, no problem, everything I came across showed it should be very simple to create an aggregate device and it should "just work".

My actual result was that

a.) It didn't work at all, no matter what, sound would only go to one output, the first one listed in the aggregate device.

b.) Since I have no software volume control for digital out, that meant even if the aggregate device did work I would have no software volume control for the device. :(


So the answer in my case was to use a combination of Soundflower and AU Lab, which is a part of Xcode -> /Developer/Applications/Audio/AU Lab. Installing Soundflower adds a couple of psuedo? audio devices, a 2-channel and a 16-channel, but they don't really do anything until you tell them how and that's where AU Lab comes in.

After installing Soundflower and restarting, I opened Audio/MIDI Setup and added an aggregate device named Surround Sound consisting of my digital output, line out and the new soundflower 16 channel device. Then I opened AU Lab and put those new devices to use, in the first window that's shown when the app opens I added a couple outputs, so I had outputs for line out and for S/PDIF.

http://img206.imageshack.us/img206/8436/tab1bm0.png

In the next section I only needed one input.

http://img386.imageshack.us/img386/9345/tab2kg3.png

The following section is where it gets interesting, I clicked input channels and selected the soundflower 16 device

http://img370.imageshack.us/img370/1085/tab3vi4.png

I then clicked on output channels and selected the Surround Sound device I created earlier then hit done

http://img392.imageshack.us/img392/4663/tab4en6.png

and ended up with this

http://img386.imageshack.us/img386/7102/tab5cd5.png

The added bus 1 and 2 just act like an amplifier making the sound louder and clearer, the unused output is there because I found that without it I would get some horrible feedback at times.


This solution is less than elegant to say the least, it's also not really surround sound, it's stereo, but it works for me. I have sound coming from all 7 speakers and the sub, I also have software volume control. Setting the configuration to open at login means I just have to minimize or right click and hide it, so it's less of an inconvenience.

Well, hopefully someone else finds this info useful. :)

Ianxxx 12-17-2008 12:25 PM

This works great, thanks
I worked out how to not have to minimize on each start
open the au file with textmate and scroll to the bottom and change

Code:

<key>Window Frame</key>
<string>{{388, 40}, {355, 577}}</string>
<key>Window Max</key>
<string>{2560, 1622}</string>
<key>Window Min</key>
<string>{360, 540}</string>

to

Code:

<key>Window Frame</key>
<string>{{1, 1}, {1, 1}}</string>
<key>Window Max</key>
<string>{2560, 1622}</string>
<key>Window Min</key>
<string>{1, 1}</string>

Shame it show's crash message on quiting without closing file first but you can't have everything

A more eligant approach would be a program called upmix by the same software company as soundflower, unfortunatly not only is it software you have to pay for but its nearly 500 us dollars :-(

Edit: Sorry Ianxxx, unfortunately I cut the first part of your post, could you please add it? Please apologize.

No probs :-)Ian

fahrvergnuugen 04-03-2009 01:08 PM

I registered just to say thanks for posting this. I spent 2 days trying to figure out how to get my mac to output to dual sound cards. I can't believe how difficult it is.

mr_murder 04-25-2009 02:01 AM

Great guide (Y) thanks. Hopefully there'll be a "cleaner" solution eventually... VoodooHDA is looking promising.

Quote:

Originally Posted by Dies
a.) It didn't work at all, no matter what, sound would only go to one output, the first one listed in the aggregate device.

this is what happens when playing stereo, os x doesn't have an integrated speaker fill option, sound is only passed to the correct discrete channel specified in the source media. did you try something such as a video file with ac3 5.1 audio, with perian set to multi-channel output? also, apple dvd player with output 5.1 thru spdif (digital out) ONLY :( have to use VLC for multi-channel instead.

Quote:

Originally Posted by Dies
b.) Since I have no software volume control for digital out, that meant even if the aggregate device did work I would have no software volume control for the device. :(

it's normal for a spdif output not to have a software volume control isn't it? because the outputs aren't being handled in software, simply being passed-thru digitally.

I use 3 line-outs as an aggregate for 5.1, and still get no volume control (ALC888) i think this is a limitation of the aggregate devices.
But I came up with a little fix & i guess anyone else with this problem can use these steps to try to force software volume control:
1) Make sure each output you intend to use is set to full volume in sound preferences.
2) Set the aggregate device up as usual & assign speakers in Audio midi setup.
3) Using Soundflowerbed, set the 6 channels of the aggregate device to the first 6 of Soundflower16ch.
4) Select Soundflower16ch as default output & configure speakers for multichannel output in Audio midi setup.
5) Software volume control for your 5.1 enabled system :D

hope this helps someone...

Dies 04-27-2009 06:25 PM

Quote:

Originally Posted by mr_murder (Post 25245)
it's normal for a spdif output not to have a software volume control isn't it? because the outputs aren't being handled in software, simply being passed-thru digitally.

On a technical level, you're right of course, and it can be assumed that the device handling that digital signal or the one providing the final output will have a volume control for it.

BUT every other major OS ( Linux, Windows ) typically provides software volume control for every available output, at least in my experience.

zorro23 11-13-2011 11:18 PM

Sound delay on selected devices
 
It is very easy now in Lion to make Multi-Output Device in Audio MIDI Setup and have sound output on multiple outputs.

I have Hackintosh with standard analog line-out witch is connected with stereo amplifier and also a HDMI output connected on LG LCD TV (little built-in stereo speakers).
The problem is that there is a noticable sound delay on my LCD TV.

I' m looking for a solution which would give me an option to apply sound delay on line-out and no delay on digital-out, so I would have sound at the same time from both set of speakers.

Anyone have any idea?