Closed GoogleCodeExporter closed 9 years ago
Patches welcome.
Original comment by fredsa@google.com
on 16 Feb 2012 at 5:50
Hi,
Here is my patch, I've solved it by adding a path attribute to the Android
Sound so that we can return the sound if it was already loaded by the
MediaPlayer in AndroidAudio. Don't know if you like this, but can easily change
it as long as we don't return a new object on every call in AndroidAudio.
Keep up the good work!
Cheers,
Erik Jan
Original comment by erikjan....@gmail.com
on 16 Feb 2012 at 7:35
Attachments:
Erik Jan,
I think the AndroidAudio getSound() method name was probably misleading. I went
ahead and renamed the method to be createSound(), consistent with the other
backends.
http://code.google.com/p/playn/source/detail?r=fe321caab3a600e704eb2ab339524c3b5
015ecb2
Note, it's intentional that multiple calls to Assets#getSound() with the same
path will return multiple unique Sound instances, which each will have a
separate isPlaying() state. This allows you to have multiple channels playing
the same sound effect simultaneous (but with different start/end times).
Original comment by fredsa@google.com
on 23 Feb 2012 at 9:59
Original issue reported on code.google.com by
erikjan....@gmail.com
on 16 Feb 2012 at 7:46