Menu

#14 Sound Card ID's change with restart

open
nobody
None
5
2015-02-28
2012-09-16
No

Everytime my computer restarts 11 USB sound cards hooked up randomly get new ID's so each instance of shairport4w gets a random sound card selected. I'm not sure if it's possible to change how the sound card ID's are found or if it's possible to use the playback device name. I might try some different USB sound cards or go to pci cards.

Discussion

  • Void Man

    Void Man - 2013-06-02

    Same problem here! I have 3 usb and one internal sound devices. The Ids are always switched around after a reboot. My system automatically reboots on Sunday. There is no monitor on this computer and it is a pain to remotely login and fix shairport every week.

    I've often been embarrassed when I find out that I'm blasting my music outside instead of in my basement.

    Please fix this issue. It should be pretty simple to fix. Here's a link that might be helpful:
    http://msdn.microsoft.com/en-us/library/windows/hardware/ff538523(v=vs.85).aspx

     
    • Sean Walter

      Sean Walter - 2015-02-20

      +1 to please fix this. I just started running multiple instances of shairport4w on one pc, and the random reassignment of outputs is really painful. I am contacting support teams for some of the closed source providers of airplay servers for Windows, but I far prefer open source, plus shairport4w is extremely lightweight.

      Note that SqueezeLite (https://code.google.com/p/squeezelite/) on Windows takes the output device by name as a command line argument, so it ought to be possible to link shairport4w to an output device based on its name.

      I will post back here if I find a good workaround in the meantime. If the closed source options can't do this, my next alternative will be to run linux shairport in a VM within Windows. A friend told me he has been able to persist the binding of shairport instances to specific audio devices within linux...fun times...

       
  • Sean Walter

    Sean Walter - 2015-02-28

    Just posting in case anyone else runs into this problem. I was able to fix it entirely within Windows, using a redirect to VLC. You need to do a couple of things to make this work:

    1. Install VLC if you haven't already

    2. In VLC preferences, ensure that you enable multiple instances to run simultaneously (Tools-->Preferences-->Interface, uncheck "Allow only one instance")

    3. In shairport4w Advanced Options (Edit-->Advanced...) do the following:

      • Check the box for "Redirect to:"
      • In the redirection drop-down, enter a VLC command line to take shairport4w output and pipe it to your desired USB output device. You can get the full name of every device in the Soundcard dropdown in the bottom half of the Advanced Options

    For reference, one of my command lines is the following:

    C:\Program Files (x86)\VideoLAN\VLC\vlc.exe --directx-audio-device="Speakers (2- USB Audio Device)" --demux=rawaud --rawaud-channels 2 --rawaud-samplerate 44100 -
    

    Do not forget the hyphen at the very end, and be sure to include the audio device name in quotes if there are spaces in the name. Also, depending on your Windows config, your choice of VLC audio device may need to be different.

    In the Advanced Options, I left "Keep alive..." unchecked and it works fine. There is a lag of a few seconds whenever the VLC instance has to start, but I have enough other things going on at that PC that I am ok with this. I am guessing if you checked the box, then the VLC instance would run perpetually and the lag would go away.

     

Log in to post a comment.

MongoDB Logo MongoDB