Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 143

Hybrid View

  1. #1
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,497

    [ANNOUNCE] SqueezePlay for Mac OSX

    I've created MacOS Squeezeplay builds with the ability to select the output device and set the maximum sample rate.

    7.8.0.r1149 - 20190516
    7.8.0.r1101 - 20180524

    SqueezePlay-ppc-7.8.0.dmg - Support for MacOS 10.3 - 10.6. Only tested on 10.4 intel rosetta. My powerpc macmini has been dead for a long time now.
    SqueezePlay-i386-7.8.0.dmg - Support for MacOS 10.4 - 10.12
    SqueezePlay-x86_64-7.8.0.dmg - Support for MacOS 10.7+. Includes fix for black square under mouse cursor.

    See the commit history for changes.

    This version plays 24/96 wave and flac files natively using LMS 7.9.0 or newer. The maximum sample rate can be set as high as 384000 in the USEPAMAXSAMPLERATE key, see below, but I haven't tested it, any value higher defaults to 384000.

    Installation?

    Mount the SqueezePlay-7.8.0r1149.dmg disk image file and drag the SqueezePlay.app icon to Applications.

    How do I change the output device and/or maximum sample rate?

    There's Flimflam's Automator method to create a wrapper app to include setting the environment variables.

    Also see Nonnoroger's post #11 for a work around to the environment.plist support removal from 10.8.

    For 10.6 and 10.7 you can create a file called environment.plist in your home directory in the .MacOSX folder.

    You may need to create the .MacOSX folder. So the full path to my file is

    /Users/ralphy/.MacOSX/environment.plist

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>USEPADEVICE</key>
            <string>Sennheiser USB Headset</string>
            <key>USEPAMAXSAMPLERATE</key>
            <string>96000</string>
            <key>USEPAPLAYNICE</key>
            <string>1</string>
            <key>SDL_VIDEO_ALLOW_SCREENSAVER</key>
            <string>1</string>
    </dict>
    </plist>
    For 10.8+ use should use launchctl from the Terminal app.

    Here's how to enable USEPAPLAYNICE.

    Set the variable value to 1 (true).

    Code:
    sudo launchctl setenv USEPAPLAYNICE "1"
    Confirm the variable has been set.

    Code:
    sudo launchctl getenv USEPAPLAYNICE
    1


    To obtain the list of available output devices that can be used for the USEPADEVICE key you can download squeezelite for OSX dmg, install in /Applications and run squeezelite with the -l option.

    Code:
    $ /Applications/Squeezelite.app/Contents/MacOS/Squeezelite -l
    Output devices:
      1 - Built-in Output [Core Audio]
      2 - HDMI [Core Audio]
      3 - Sennheiser USB Headset [Core Audio]
    You can see how I obtained the exact match for my Headset.

    Once you've finished editing the environment.plist file you MUST logout and log back in before the keys will be available to SqueezePlay. You can check if the values have been set from the Terminal App.

    Code:
    $ set | grep -i usepa
    USEPADEVICE='Sennheiser USB Headset'
    USEPAMAXSAMPLERATE=96000
    Source code is available on github.

    Builds are available on sourceforge.
    Attached Files Attached Files
    Last edited by ralphy; 2019-05-18 at 05:44. Reason: Released 7.8.0r1149 - May 18/19
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Posts
    137
    Quote Originally Posted by ralphy View Post
    I've created an OSX i386 and x86_64 only build with the ability to select the output device and set the maximum sample rate.

    ...

    Hopefully this works for the Mountain Lion folks to override the new AirPlay default output devices.
    Many thanks for this. I have been trying it under ML (which by the way is now on 10.8.1 so is no longer a .0 release). Sorry to say that it still sends output to Airplay (very quietly) despite the environment variable settings. I tried with Built-in Output.

    I will double-check tomorrow that I have the set-up and definitions right. Anyone else been trying?

    I don't know if this is related, but Rogue Amoeba's SoundSource, which I used quite happily under Lion, is marked by them as not compatible with Mountain Lion.

  3. #3
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,744
    @ralphy

    You might want to have a look at this:
    http://joris.kluivers.nl/blog/2012/0...mountain-lion/
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Posts
    137

    .MacOSX/environment.plist not supported in 10.8

    Ralphy

    I set the needed environment variable using export from the command line and then ran your Squeezeslave using the open command.

    Hey presto - sound output to Built-in Output as I had specified.

    I checked my environment.plist with the XCode property list editor and there were no problems. So a little digging around led to this result that came from from the Developer Forums:

    ===========
    Change the Info.plist of the .app itself to contain an "LSEnvironment" dictionary with the environment variables you want.
    ~/.MacOSX/environment.plist is no longer supported.
    ===========

    So a bit more work for 10.8 support I am afraid.

  5. #5
    Senior Member
    Join Date
    Jan 2010
    Posts
    137
    A bit more on this from the Developer site (the LS stands for Launch Services - launchd):

    =============
    LSEnvironment

    LSEnvironment (Dictionary - OS X) defines environment variables to be set before launching this app. The names of the environment variables are the keys of the dictionary, with the values being the corresponding environment variable value. Both keys and values must be strings.

    These environment variables are set only for apps launched through Launch Services. If you run your executable directly from the command line, these environment variables are not set.
    =============

    For now, I will use a shell script to export the variables and open the app.

  6. #6
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,497
    Thanks for tracking this down.

    I should have known to check if the environment.plist file was still supported in Mountain Lion. Part of the reason I haven't upgraded is Apple keeps "dumbing down" OSX with every release.

    Could you post your startup script so everyone can benefit?
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  7. #7
    Senior Member
    Join Date
    Jan 2010
    Posts
    137
    Quote Originally Posted by ralphy View Post
    Could you post your startup script so everyone can benefit?
    From a terminal command line, create runPlayer containing the three lines (assuming the app itself is in your own Applications folder):

    export USEPADEVICE="Built-in Output"
    export USEPAMAXSAMPLERATE=9600
    open ~/Applications/SqueezePlay.app

    Then make the script executable with the command:

    chmod +x runPlayer

    If you are familiar with the command line environment, you could put runPlayer in your /usr/local/bin folder where it should be found whatever your directory as just

    runPlayer

    Otherwise, from the directory you created it, type

    ./runPlayer


    As soon as I get time I will try creating the suggested dictionary for environment variables in the Info.plist for the app.

  8. #8
    Senior Member
    Join Date
    Aug 2005
    Posts
    315
    Quote Originally Posted by ralphy View Post
    This version plays 24/96 wave and flac files natively using the latest LMS 7.8.0 nightly.
    Does this *require* 7.8.0 LMS, or will 7.7.2 suffice?

    Thanks! -mark

  9. #9
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,497
    Quote Originally Posted by mbonsack View Post
    Does this *require* 7.8.0 LMS, or will 7.7.2 suffice?

    Thanks! -mark
    7.7.2 is fine.

    I've tested 24/96 with this version as far back as 7.6.2 any sample rate higher than 96000 requires a 7.8.0 nightly.
    Last edited by ralphy; 2012-09-07 at 14:17.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  10. #10
    Senior Member
    Join Date
    Jan 2010
    Posts
    137

    Updated start up script for command-line users

    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--------------------------
    Last edited by nonnoroger; 2012-09-08 at 08:23. Reason: Removed stray * characters in script

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •