Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    Quote Originally Posted by Phil Leigh View Post
    How hard would it be to give SP the ability to choose it's audio output device on the host computer it is executing on?

    What would it take to add it to SP?
    The easiest way would be to use an environment variable to override the default device selection loop at line 425 in decode_portaudio.c with the output device index you want SP to use.

    Getting the override index value is the tricky part. The device list provided from squeezeslave -L might work to get the right number.

    I could hack it to together quickly, if you haven't already got something working.
    Ralphy

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

  2. #12
    Senior Member Phil Leigh's Avatar
    Join Date
    Apr 2005
    Location
    Cornwall, England
    Posts
    9,991
    Quote Originally Posted by ralphy View Post
    The easiest way would be to use an environment variable to override the default device selection loop at line 425 in decode_portaudio.c with the output device index you want SP to use.

    Getting the override index value is the tricky part. The device list provided from squeezeslave -L might work to get the right number.

    I could hack it to together quickly, if you haven't already got something working.
    That would be exceptionally kind of you - I could probably hack the C code but I don't have the bits and pieces to turn that into a Windows executable!
    regards
    Phil
    You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
    Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
    Stax4070+SRM7/II phones
    Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.

  3. #13
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    Quote Originally Posted by Phil Leigh View Post
    That would be exceptionally kind of you - I could probably hack the C code but I don't have the bits and pieces to turn that into a Windows executable!
    regards
    Phil
    Unfortunately, I don't have an MSVC build environment either, squeezeslave for windows is built with gcc/cygwin.

    I'll make the changes and test it on linux first.
    Ralphy

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

  4. #14
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    Turns out squeezeplay on linux uses decode_alsa.c and not decode_portaudio.c.

    Good news is I have been able to play music on non default audio devices.

    I'm investigating if it's easy to save and restore the output and sound effect devices using the settings files created by squeezeplay and have all OS versions use those settings.
    Ralphy

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

  5. #15
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    Quote Originally Posted by Phil Leigh View Post
    That would be exceptionally kind of you - I could probably hack the C code but I don't have the bits and pieces to turn that into a Windows executable!
    regards
    Phil
    Installed VC2008 Express on my dev system.

    I've got a build for you to try. Saving the audio device in the settings files proved problematic so I opted for a User Environment Variable: USEPADEVICE

    You need to set the USEPADEVICE user variable with the text name of the device as returned from squeezeslave -L. The match is case insensitive but if you happen to add an extra space anywhere in the name the match will fail and no audio device will be used. I grabbed a screen shot of setting this up on XP.

    Once you've set USEPADEVICE, you'll need to set it to the default device name to get squeezeplay to output again to the default device.

    I've attached a patch of the change and I've sent you a PM.

    I'm planning to do a similiar change for alsa as well, the current changes only work for Windows and OSX.

    Hopefully one of the developers will consider adding both changes to the source once I'm done.
    Last edited by ralphy; 2011-05-08 at 05:09.
    Ralphy

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

  6. #16
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    and here's the patch to enable changing the output device for linux ALSA.

    Usage:

    Get the alsa device.

    Code:
    squeezeslave -L
    
    Output devices:
      0: (ALSA) HDA Intel: ALC883 Analog (hw:0,0) (11/46)
      1: (ALSA) HDA Intel: ALC883 Digital (hw:0,1) (11/46)
      3: (ALSA) Logitech USB Headset: USB Audio (hw:1,0) (11/46)
      4: (ALSA) front (11/46)
      5: (ALSA) surround40 (11/46)
      6: (ALSA) surround41 (11/46)
      7: (ALSA) surround50 (11/46)
      8: (ALSA) surround51 (11/46)
      9: (ALSA) surround71 (11/46)
     10: (ALSA) iec958 (11/46)
     11: (ALSA) spdif (11/46)
    *12: (ALSA) default (42/46)
     13: (ALSA) dmix (42/42)

    For devices in the list that have a (hw) number beside the device name you must use that.

    If I wanted to use the Logitech USB headset I'd set USEALSADEVICE like this.

    Code:
    export USEALSADEVICE="hw:1,0"
    Then run squeezeplay.

    Code:
    squeezeplay
    If I want to use the "front" speakers device I'd use

    Code:
    export USEALSADEVICE="front"
    squeezeplay
    since there is no (hw) number listed beside it.

    To change back to the default ALSA device remove the environment variable.

    Code:
    unset USEALSADEVICE
    Squeezeplay only checks the environment variable at startup. So to use a new audio device, you must quit squeezeplay, export USEALSADEVICE with the new device and start squeezeplay again.
    Ralphy

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

  7. #17

    Need another tester?

    Hello Ralphy

    Would it be possible for me to try this update? I'm OSX based with an external USB DAC attached that I'd like to use with Squeeezeplay.

    I have Squeezeslave working just fine with the DAC so should be able to follow your instructions

    Thanks

  8. #18
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,768
    You should be able to use the usepadevice-portaudio.patch.txt file from post #15 above.

    You'll need to set USEPADEVICE to the alternate device from a terminal window.

    Code:
    $ squeezeslave -L
    Output devices:
    * 1: (Core Audio) Built-in Output (0/4)
      2: (Core Audio) Logitech USB Headset (2/29)
    
    $ export USEPADEVICE="Logitech USB Headset"
    $ squeezeplay
    Ralphy

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

  9. #19
    Senior Member bakker_be's Avatar
    Join Date
    May 2009
    Location
    Westerlo, Belgium
    Posts
    579
    Hi there,
    any pointers to how I apply this patch on a Windows system? Do I use SVN to check out the code and then apply the patch, after which I build, or am I on the wrong track completely?
    Main System: Touch; Marantz SR-5004; TMA Premium 905; TMA Premium 901; BK Monolith+ FF; HDI Dune Smart D1; Pioneer PDP-LX5090H
    Workshop: iPad 32GB Wifi + Squeezepad (local playback activated)
    Wherever needed: Acer Iconia Tab A700 + Squeezeplayer
    Car: BananaPi LMS + Squeezeplayer on Android phone - Controller TBD ...

  10. #20
    Senior Member
    Join Date
    May 2008
    Posts
    1,462
    Quote Originally Posted by bakker_be View Post
    Hi there,
    any pointers to how I apply this patch on a Windows system? Do I use SVN to check out the code and then apply the patch, after which I build, or am I on the wrong track completely?
    That is pretty much it, yes.
    Yes, it will. Yes, all of them. Yes, SoftSqueeze as well. What ?
    I SAID ALL OF THEM !

Posting Permissions

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