0

Scripting Audio Output



I can't get any audio output. I want to run an audio file ("ding.mp3") but nothing comes out. Please provide me with the scipt to run this file.

Also, is there a way to read the gpioButton? I.E. get a value representing the input port not just an event.

1 comment

  • 0
    Avatar
    RokuLyndon


    For mp3 playback, you can playback an mp3 easily using a playlist.



    1. Playlist playback

    -Verify you have the latest autoplay script, autorun 1.1.7

    -create a text file, named "autoplay", and change the extension to ".bsp"

    -Enter the name of the mp3 in the autoplay.bsp text file.



    ----------start of playlist--------

    ding.mp3



    -------------end of playlist-----------



    Which audio output are you using? Have you tried all three? How were you trying to play mp3? A simple custom script that would play the mp3 would be like the following:





    2. Custom script playback of a single mp3

    -----simple script to play ding.mp3----------

    audio=CreateObject("roAudioPlayer")

    audio.PlayFile("\ding.mp3")

    ------------------



    Just save a text file named autorun.bas with the two lines above, and it would play that mp3 to analog out.





    3. Richard, I'm not sure what you are asking about the GPIO input. You can get the button that's pressed.
Please sign in to leave a comment.