Naive Player Questions
livfoss at mac.com
Mon Dec 4 17:47:52 EST 2017
Hi - perhaps due to not picking the right search terms in the documentation, I am confused about playing audio files in LC 8. What I want seems quite simple to me: I want the user to click a button which will cause a single MP3 file to play. While it plays I may or may not want to switch cards or use visual effects. When it stops, I want to take back control and move the program onto something else.
It appears that I have to use a player object to play MP3s, since the “play” comment will only play aiffs. OK, so I can create a player object, but I want to embed my MP3 file into it (since I have no need to play more than one file), I want to start it, and I want the option to do stuff while it’s playing, and I certainly want to do stuff when it stops.
The documentation is not good on this - there is no indication as to whether you can embed files (if you can’t, what would the path to a file included in the program look like - I can only see paths referring to files in my development environment)? There is one reference in Beginner’s Guide to a “play stopped” message, but there isn’t one in the User Guide. My old friend “wait until the sound is done” seems to have died of old age. How do I know when the sound is finished, or alternatively how can I know if it’s still playing?
Can anyone explain what I’m supposed to do, or (just as good) point me to the right bit of LC documentation?
More information about the Use-livecode