SoundPool class - Android 1.5

All your problems with Audio, Video and Images.

SoundPool class - Android 1.5

Postby Donald_W » Tue Apr 28, 2009 3:50 pm

Hey,

Does anybody have a problem with the SoundPool class from the latest Android release? I can't load and then immediately play sounds.

For me it looks that SoundPool loads its resources on another thread - dunno how to get state of the load method. Adding a wait method or loading all resources in the beginning of whole Activity aren't solutions for me, so any ideas?

Thanks in advance,
Tomek
Donald_W
Freshman
Freshman
 
Posts: 5
Joined: Wed Apr 01, 2009 9:29 am
Location: Poland / Szczecin

Top

Postby alpesh_harsoda » Wed Apr 29, 2009 2:23 pm

i dont used it but my suggestion is go for api everything is there.
http://developer.android.com/reference/ ... dPool.html
Regards,
Alpesh Patel,
Logistic Infotech
http://www.logisticinfotech.com
User avatar
alpesh_harsoda
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat Sep 20, 2008 12:35 pm
Location: Rajkot,Gujarat(India)

Postby Donald_W » Wed Apr 29, 2009 2:26 pm

Yep, I'm already using methods from that API, but it lacks such things like: when whole sound is loaded into the memory, which stream id's are already playing etc.

This class lack lots of useful information and it's bugged a bit :/
Donald_W
Freshman
Freshman
 
Posts: 5
Joined: Wed Apr 01, 2009 9:29 am
Location: Poland / Szczecin

Postby linkmaster_6 » Wed Apr 29, 2009 5:59 pm

Well mabey the calss has been taken out? it was never a official class to start out with
linkmaster_6
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Thu Oct 16, 2008 8:52 pm

Postby tbennett » Wed May 13, 2009 6:29 pm

AudioTrack has the state tracking that you're looking for, only stipulation is that you'll need to provide the raw PCM data yourself, so if you're trying to use mp3/ogg's it can get tricky. You sure you can't cache the sounds in an initialization routine? Sounds like you might be trying to stream audio, in which case AudioTrack is definitely what you're looking for.
tbennett
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Dec 07, 2008 7:58 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 25 guests