Ejemplo n.º 1
0
                # Play the clip on a separate thread
                t = Switchplayerthread(card, soundClip.fileSpec,
                                       soundClip.volume, soundClip.balance)
                t.start()
            except:
                mod_MessageHandler.error(
                    "Oops!  Something went boom in AirhornPlayer ProcessSwitch."
                )


###############################################################################
# MAINLINE CODE
###############################################################################

#  Check to see if we have a valid Airhorn Sound drive connected.
AirhornSoundDrive = FileUtils.FindAirhornSoundDrive()
if AirhornSoundDrive == None:
    #wavplayer_alsaaudio.play('SystemSounds/needinfo.wav')
    mod_MessageHandler.error("No valid Airhorn sound drive found.")
    mod_MessageHandler.error(
        "Please initiate an Airhorn U.S.B. drive on your computer using the Airhorn Sound Manager utility."
    )
    quit()

# Load up all the ambient sounds and spin them up, each on its own thread.
LoadAmbientSounds()

# Default switch sounds to On
FileUtils.SetConfigValue("general", "switchsound", "on")

# Let the user know that we are up and ready for action