I am trying to play a simple wav file using PyGame Subset for Android. I can’t seem to get it working. Does anyone have any example code working? There isn’t any examples in the documentation.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to Pygame Subset for Android documentation, you should be able to play sounds using
android_mixer. Start by importing it [1]:Now use the mixer just as a common pygame mixer to play sounds:
Please note that “the init and pre_init methods work, but are ignored – Android chooses appropriate settign automatically” as well as that “Only filenames and true file objects can be used – file-like objects will probably not work”. Some other restrictions apply as well. [1].