In case anyone finds it useful, here is the script I have developed to
start ralphy's OSX version of SqueezePlay from the command line, setting
environment variables as needed.
Setting the needed environment variables is needed for Mountain Lion but
the script should also give more ease and flexibility for previous
versions of OSX.
The script assumes that squeezeslave for OSX is in the shell's command
search path. I put in /usr/local/bin as squeezeslave.
Also still assuming SqueezePlay is under Applications in your home
directory.
The sed mangling in the script copes with output from squeezeslave -L
like mine:
Output devices:
0: (Core Audio) AirPlay (2001/2011)
* 3: (Core Audio) Built-in Output (3/13)
4: (Core Audio) Soundflower (2ch) (1/11)
5: (Core Audio) Soundflower (64ch) (1/11)
6: (Core Audio) Aggregate Device (3/13)
You can select which Airplay device will be used from Audio Midi Setup's
Audio devices window (without setting Airplay as the default output). I
had to put up the volume level for Airplay in that window to get a
decent sound level.
SqueezePlay was not sending to only one device from the Aggregate Device
I tried building there.
I call my script squeezePlay and also placed it in /usr/local/bin. By
default it sets the max rate to 96Khz. Give the -s option to the script
to select another.
Airplay uses 44.1KHz but leaving at the default is fine.
------------snip--------------------------
#!/bin/bash
# default max sampling rate is 96000
rate=96000
rates=(44100 48000 96000 192000)
choices=(44.1kHz 48kHz 96kHz 192kHz)
# if -s argument given to script, prompt for selection from the common
rates
if [ "$1" == -s ]
then echo "Type the number of the max rate to use:"
select choice in ${choices[@]}
do
if [ -z $choice ]
then
* echo try again
else
* rate=${rates[$((REPLY-1))]}
* echo Using ${choices[$((REPLY-1))]}
* break
fi
done
fi
echo $rate
echo "Type the number of the device to use:"
IFS=$'\n'
select device in `squeezeslave -L | sed -e 1d -e 's/.*Audio) //' -e 's/
([0-9]*\/[0-9]*)$//'`
do
if [ -z $device ]
then
* echo try again
else
* echo $device
* break
fi
done
unset IFS
export USEPADEVICE=$device
export USEPAMAXSAMPLERATE=$rate
open ~/Applications/SqueezePlay.app
------------snip--------------------------
------------------------------------------------------------------------
nonnoroger's Profile: http://forums.slimdevices.com/member.php?userid=35581
View this thread: http://forums.slimdevices.com/showthread.php?t=96328
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss