Eight Bit
Hardcore Member
I'll try it out tonight or tomorrow.
Is that mac address necessary?
				
			Is that mac address necessary?
I just think it would be very inconvenient as my speakers have a different MAC than my car stereo or BT headset.. I guess it's not necessary as I don't have to right now either... Anyway, will try
Also I hope Rockbox will work with your method as that's ideal for in the car!
#!/bin/bash
# This is a quick and dirty but still quite awesome script to switch ALSA
# output on the fly. It copies valid config files to enable output
# devices on demand.
# As of version 0.1.mod two configs are provided:
#
# 1. BT output -> .asoundrc_bt1
# 2. BT output -> .asoundrc_bt2
# 3. HW output -> .asoundrc_hw
#
# Before any sound is being played ALSA parses the config files, so
# there's NO need to restart your system after you used this script.
#
# Please set ALSAFILES_PATH correctly!
ALSAFILES_PATH=~/alsafiles/
if [[ $# = 0 ]]; then
        echo "No options parsed. Try "$0" --help"
fi
while [[ $# > 0 ]]
do
key="$1"
case $key in
    -o|--output)
    OUTPUT="$2"
    shift
    if [[ ${OUTPUT} = "bt1" ]];then
        echo "Switching audio output to:"
        echo ${OUTPUT}
        echo "using config files from:"
        echo ${ALSAFILES_PATH}
        rm -v ~/.asoundrc
                cp -v ${ALSAFILES_PATH}.asoundrc_bt1 ~/.asoundrc
    elif [[ ${OUTPUT} = "bt2" ]];then
        echo "Switching audio output to:"
        echo ${OUTPUT}
        echo "using config files from:"
        echo ${ALSAFILES_PATH}
        rm -v ~/.asoundrc
                cp -v ${ALSAFILES_PATH}.asoundrc_bt2 ~/.asoundrc
    elif [[ ${OUTPUT} = "hw" ]];then
                echo "Switching audio output to:"
                echo ${OUTPUT}
                echo "using config files from:"
                echo ${ALSAFILES_PATH}
        rm -v ~/.asoundrc
        cp -v ${ALSAFILES_PATH}.asoundrc_hw ~/.asoundrc
    else
        echo "Unsupported output mode parsed. Exiting."
    fi
    ;;
    -h|--help)
    echo
    echo "KickAss Pandora Audio Switch v0.1.mod -- Modified For Two BT Devices"
    echo "------------------------"
    echo "Usage:"
    echo "-h|--help     Display this message."
    echo "-o|--output    Set audio output mode."
    echo "            So far bt1, bt2, and hw are supported."
    echo
    echo "Example: ./audioswitch.sh -o bt1"
    echo
    ;;
    *)
    echo "Unknown option parsed. Exiting."
    ;;
esac
shift
doneexactly.The -o arguments accepted by this script would now be "bt1", "bt2", and "hw".
It doesn't. Gmu is not a frontend for mplayer. It implements everything needed for audio file playback itself and uses SDL for audio output. Since SDL is able to use ALSA, it also recognizes and uses an .asoundrc file in its home directory if there is one and it can see and access it. If it only sees its own private home a global .asoundrc simply does not matter.i'd like to investigate how gmu invokes mplayer to play the files. because plain mplayer works the way it should.
I did that before and it didn't work. It basically says it fails to set bluetooth parameters correctly.You could extract the PND file and try to call Gmu without the PND stuff. This will probably work as expected.
Does drastic use the same version of SDL as Gmu does? SDL2 might do audio things differently.no i dont use pa on slackware. i try to avoid it on purpose.
the point i totally don't get:
drastic uses sdl and works with bluetooth audio without any problems.
gmu uses sdl and keeps failing.
it's driving me mad.
no i dont use pa on slackware. i try to avoid it on purpose.
the point i totally don't get:
drastic uses sdl and works with bluetooth audio without any problems.
gmu uses sdl and keeps failing.
it's driving me mad.
Sorry 'bout that. Here you said it did use SDL. Didn't know the pandora version was so different.DraStic doesn't use SDL, at least not the Pandora version. It uses ALSA directly.
 
	