Android : Most Accurate Method Of Using SoundPool?

Mar 2, 2009

I need a recommendation from someone for the most accurate way of timing SoundPool sounds. I can't loop them because what's desired is not a loop but very accurate (to the ear at least) timing.

Android : Most accurate method of using SoundPool?

Android :: Why SoundPool Mute?

Sep 8, 2009

I setup my SoundPool, and load a sound resource as this in onCreate():

soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);
soundId = soundPool.load(this, R.raw.edible_underwear, 1);

And then I try to play this sound twice in a onClick(), one slow mostly in left speaker, and one fast mostly in the right speaker:, 0.9f, 0.1f, 0, -1, 0.7f);, 0.1f, 0.1f, 0, -1, 1.5f);

No sound can be heard. I have fiddled with the volumes, priorities and rates. So far to no avail. Am I missing something obvious?

View 2 Replies View Related

Android :: Sound Effect Using SoundPool

Feb 12, 2009

there seems to be a dead-lock problem when using sound effects with SoundPool. I was hoping the the problem would be fixed in the new firmware update, but unfortunately, it was not. The application still locks up after couple of minutes when playing sound effects using SoundPool. My application is a game playing a background music scenario with multiple simultaneous sound effects. Any word from devs as when we can expect stable SoundPool would be very welcome.

View 21 Replies View Related

Android :: Stop A Soundpool Of 4 Streams

Aug 22, 2010

What is the Easiest way to stop a soundpool of 4 streams.

mSoundManager.addSound(1, R.raw.svphorn);
mSoundManager.addSound(2, R.raw.svpphaser);
mSoundManager.addSound(3, R.raw.svpwail);
mSoundManager.addSound(4, R.raw.svpyelp);

I need a button to stop all sounds playing @ one time.

View 1 Replies View Related

Android :: Playing Default Ringtone Using SoundPool

Nov 1, 2010

I've been trying to use SoundPool to play the default ringtone without success. In the code below

String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath();
SoundPool ringPhone = new SoundPool(2, AudioManager.STREAM_RING, 1);
int soundID = ringPhone.load(Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1);
int soundID = ringPhone.load(ringtone, 1);, 0.99f, 0.99f, 1, 0, 1);

I get the message "error loading content /system/ringtone sample 0 not READY". Replacing the URI with a hard path to an existing mp3 file on the sd card yields similar results.

View 1 Replies View Related

Android :: Prevent Truncating Of Sounds In Soundpool?

Sep 8, 2010

Is there a reliable way to prevent truncating of sounds in soundpool? I have had some success with the sleep() function between sounds, but they still sometimes miss the last bit of sound before starting another sound. My app plays short sounds in sequence.

View 1 Replies View Related

Android :: Sounds Not Loaded - SoundPool Working Correctly?

Feb 25, 2009

I've recently started working with the SoundPool class in SDK 1.1R1, and noticed that my app deadlocks from time to time, or sounds are not loaded. I remember reading, back in November, that this was to be addressed in the next SDK. I've used pretty much the same code that others have used and most of the time it works for a bit. Just a minute ago, the app completely crashed with no "Force Close" and returned to the home screen. Logcat reveals that "HeapWorker is wedged: 26577ms spent inside Landroid/media/SoundPool;.finalize()V" I'm not sure if this is the same issue others had with SoundPool or if I have encountered an entirely new beast.

View 13 Replies View Related

Android :: Cannot Stop Soundpool Loop Even After Exiting Application

Nov 4, 2010

I have a timer thread setup to play a loop using soundpool, but for some reason I cannot get _soundPool.stop(_playbackTimer); to stop the loop. even if I exit the application the loop keeps running. I have to physically power off the phone to get it to stop. am I missing something here? Does anyone have any experience with this? I have searched with no resolution. below is a snippet.

if(timeLeft>0 && timeLeft<20 && ticking == false){, 0.3f, 0.3f, 0, -1, 1); ticking=true; }
if(timeLeft==0 || timeLeft>20){ _soundPool.stop(_playbackTimer); ticking=false; }

View 2 Replies View Related

Android :: Playing Default Ringtone With SoundPool Or MediaPlayer

Oct 31, 2010

How do I get the default ringtone to play? I've tried using SoundPool (preferred method) and MediaPlayer to play it but I'm getting nowhere. I've done so many dumb things, I'll just include the last fail. In the following snippet: String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath(); SoundPool ringPhone = new SoundPool(1, AudioManager.STREAM_RING, 0); int soundID = ringPhone.load Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1);, 0.99f, 0.99f, 1, 0, 1.0f);

loads but plays nothing. When I display Settings.System.DEFAULT_RINGTONE_URI.getPath(), it's returning /system/ ringtone

View 2 Replies View Related

Android :: Audio Channels Swapped On 1.1 Emulator?

May 20, 2009

I just found that left/right channels are swapped when calling soundID, float leftVolume, float rightVolume, int priority, int loop, float rate), running in 1.1 emulator on MacOS. Unfortunately I'm far away from my G1 headset (with proprietary connector) so I can't check if the behavior is the same.

View 2 Replies View Related

Android :: Cupcake (API3) Pause / Stop Sound Loops In SoundPool?

Aug 28, 2010

What I have here is a simple button that plays a looped sound while it's pressed. It works great. However, sounds.autoPause(); wasn't introduced until API 8 and I really need something that is cupcake compatible (API 3) So i was going through the dev reference site filtered by API 3 stuff and i saw pause so i figured i'd try sounds.pause(sound); but it doesn't stop the sound when i release it. (Maybe i'm just using it wrong?) Does anyone know of a cupcake friendly way to stop this sound? thanks!

sounds = new SoundPool(5, AudioManager.STREAM_MUSIC, 0); sound = sounds.load(this.getApplicationContext(), R.raw.red_long_one, 1); Then here's my touch event................

View 4 Replies View Related

Android :: Low Level Audio - Latency In SoundPool - AudioTrack For Real Time

Oct 26, 2009

I first have to say that I'm biased, 'cus I like to write music apps (like music generation apps). However, this affects games as well. It's somewhat disappointing how OpenGL has made it into the NDK now but there isn't any NDK methods to get to sound to have faster access. Over the weekend I did some more testing and if you make a "drum" app, for example, and play the sound using either SoundPool or AudioTrack, you will get about a 100ms delay buffer, which is clearly audible (gap).

I made a test app where when you touch the screen, upon the DOWN event, it would play a short sound (like a drum sound). It clearly was not real time responsive or even close - you could hear the delay. I'd be interested to know if anyone who has made a game has any trouble with sounds? It seems like they aren't going to really trigger real time enough if you use SoundPool, for example. Am I completely wrong? Seems like your game is going to perform an action, play a sound, but the sound will have latency which I would think would throw off the game a bit..................

View 12 Replies View Related

Android :: Method OnBackPressed() Of Type FirstGroup Must Override Superclass Method

Sep 7, 2010

I'm trying to override the onBackPressed() method of the ActivityGroup class:

public class MyClass extends ActivityGroup {

public void onBackPressed() {
// do something

but I'm getting the error The method onBackPressed() of type MyClass must override a superclass method. I'm relatively new to Java, I've seen here that people do it and it works for them Why I'm getting this error? I'm writing an app for android 1.5, could the problem be here?

View 1 Replies View Related

Android :: Show Method Definition - Eclipse Recognizes Warning On Method

Nov 22, 2010

In Eclipse, when I mouse hover over a built-in method, it displays a method definition including stuff like what the method does, input objects, return objects etc. If I have a yellow line (warning) under the method I'm trying to use, I can't get the mouse-over to show the definition. If I try hitting F3, I get a "The Jar of this class file belongs to container "Android 1.6" How do I show the definition of the method I am using when there is a warning?

View 1 Replies View Related

Android :: Method.getAnnotation( ) Or Method.isAnnotationPresent( ) Not Working

May 12, 2010

I am trying to use annotation - method.getAnnotation( ) or method.isAnnotationPresent( ) and it is not working. I am using eclipse emulator for 2.1 OS version with JDK 1.6. Following is information about what I did..................

View 4 Replies View Related

Android : How Accurate Is GPS

Jul 12, 2009

I'm totally new to the G1, coming from an iphone, but my gps when on (and can actually get a signal lock), seems to always have me on the grass or in the water if driving my any. Its rarely ever where I am. and im in a major city. Perhaps that could be why, but i always have clear view to the sky.

View 12 Replies View Related

Android : More Accurate Battery App For Phone?

Nov 20, 2010

I've been looking for a battery widget to tell me my remaining charge state as a percentage, but so far all of them go in increments of 10% (i.e. 90% left, to 80%, to 70%, etc). Does anyone know of one that breaks it down a little more finely?

View 8 Replies View Related

Android : Get More Accurate Location - When Using MyLocationOverlay

Aug 2, 2010

I'm trying to get my current location and show it on a map. Class does most of the work for you. But it's coming back with a very coarse result that's off by a couple of clicks. I'm listening for onAccuracyChanged() but that never gets called.

How can I get a more accurate location, when using MyLocationOverlay ?

PS. manifest has

<application android:icon="@drawable/icon" android:label="@string/app_name"
<uses-library android:name="" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

View 1 Replies View Related

Android :: How Accurate Is Location.getSpeed?

May 30, 2010

I'm writing my first location based android app, but got confused about some of the GPS service api. Here are some questions I have:

1) To get my current location, I called requestLocationUpdates() with a listener in the onCreate() method of one activity. But what happens when another activity starts and the current activity goes invisible? Is the GPS location update going to stop? If so, how do I keep it on after the activity is switched?

2) how accurate is the Location.getSpeed()? How is it computed? Can it tell the difference between on bicycle and on foot?

3) not really a question about android. How to calculate the coordinates of a location, say, 100m away from my current location?

4) To stop the GPS, I only need to remove all the listeners that have been registered to locationmanager?

View 2 Replies View Related

Android :: Using SoundPool But Sound Plays After A Delay - Sound Is Lagging

Dec 18, 2009

I am using the SoundPool as follows:

Caching my sounds:


Playing a sound effect i.e when button is clicked:

Resources.playSound(context, Resources.SOUND_PIECESELECT);

However as I said the sound is lagging. What can I do to improve this? All my sounds are OGG file format.

View 9 Replies View Related

Android :: How To Keep GPS Active Until More Accurate Location Is Provided?

Jan 2, 2010

I recently posted this question on stackoverflow ( yzrofne), but maybe someone here can help me. I am using the location manager's requestLocationUpdates() method to receive an intent to my broadcast receiver periodically. The system is correctly firing the intent to my broadcast receiver, and I have been able to use it correctly. The only problem is that the GPS location provider only stays active for a few seconds after the initial location acquisition, and I need it to stay on a little longer so that the location estimates are more accurate. For example, if I tell the location manager that I want an update every 5 minutes, it correctly fires the intent with location information from the GPS. However, the GPS only stays active for about 5 seconds, so it doesn't give much time for the location to reach a high accuracy (say, less than 10-20 meters). My question is how to make the GPS location provider stay active for each periodic request that comes from the LocationManager requestLocationUpdates. Does anyone know how to do this?

View 2 Replies View Related

Android :: Accurate Weather Forecast Application?

Dec 28, 2009

I hope this is the right section to post this, I have an HTC / G2 on a T-Mobile UK contract. I'm after a good weather forecast app that works well for the UK and Europe. I also use WeatherPro on my iPOD Touch (when I can link up to my home WiFi) and it is great - it picks up small towns, gives 5 day forecasts, 24 hour forecasts broken down into 3 hour time slots, shows satellite and radar, temperatures in 'F and 'C, windspeed and direction. It is very accurate too! I can't find it on the Android Market though.

View 5 Replies View Related

Android :: Not Accurate - Build Compass For My Application

May 4, 2010

I need to build compass for my application.

From reading the documentation it seems there are two reasonable ways of doing this:

Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purposes is unacceptable.

Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD and getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() method: The documentation says this "is usually more accurate". The problem is regardless of the delay I register with listener the compass goes crazy even when the device is stationary on flat surface.

View 2 Replies View Related

Android : Accurate Are Data Counters Like 3G Watchdog?

Nov 30, 2009

Is anyone who is using 3G Watchdog or NetCounter actually receiving accurate stats compared to what Orange are showing on their OrangeWorld "Your Account" section?
I have been using my new HTC Hero for just over 2 weeks now and Orange are saying that I have used 422MB of data. This seems ridiculous to me as I only automatically check email once per hour, surf to the extent of anyone with such a new gadget, and spend every evening at home connected to WiFi from about 6pm onwards.
I phoned Orange one day last week and they advised that I had used 310MB up to that point, so I immediately downloaded 3G Watchdog and started it running. Since then, it says that I have used 36MB in the same period that Orange say I have used 112MB.
I also use NetCounter, but as I didn't reset it last week, I can't make any specific comparisons. However, on a daily basis it always agrees with 3G Watchdog to within a few KB.

I know I will need to phone Orange to sort this out, and I am certain that they will tell me that downloaded data counter apps cannot be trusted. I'm not sure how I can prove to them that their data readings for me are wrong.

View 1 Replies View Related

General :: How Accurate Are Android Weather Apps

Mar 5, 2013

Many times when I look at different weather apps, the current temp is always either the low or the high. Never seen this on a news or weather channel.

View 1 Replies View Related

Android :: Need Display Metrix Xdpi / Ydpi Accurate?

Apr 15, 2010

Can the xdpi and ydpi settings be relied upon to accurately represent the physical pixels in once inch of screen space? I need this to be accurate for some display code I'm writing. I realize the documentation says that this is the case, but I need to know if individual handsets get this right MOST OF THE TIME. I know I can alternately use "density" which will give me 120, 160, 240 steps of DPI, but an exact dpi would be much better.

View 2 Replies View Related

Android :: Created A Method In Another Class But I Can't Use It In OnClick Method From Main Class

Nov 1, 2010

I created a method called insertTable in a class called Table but i can't use it in my onClick method in the main class :


I want to do a income.insertTable in the onClick method but eclipse say that i need to create a local variable.

View 3 Replies View Related

HTC Incredible :: Battery Level Accurate / Not?

Sep 21, 2010

New Incredible user just looking for some feedback, my battery stats are the following:
Uptime: 12:06
Awake time: 2:58
Battery use:
-Android system: 34%
-Cell standby 29%
-Phone Idle 22%
-Display 8%
-Voice calls 4%
-Maps 3%
I've been reading all other posts and their android system is significantly lower is there something draining my battery?

View 1 Replies View Related

HTC Incredible :: Default Weather App Is Not Accurate

May 18, 2010

Even having this thing sync regularly its not accurate. Where is this weather coming from? I changed to weather bug and weather channel, both free apps are way better accuracy wise.

View 16 Replies View Related

HTC Incredible :: Voice Dialer Is Not Very Accurate

Sep 16, 2010

My girlfriend recently bought the Incredible.She says the voice dialer app isn't very accurate, is there a way to train it? I had her go into the voice recognizer settings but the option to train it is not there as it was on the D2.She also says it doesn't prompt her for confirmation and she can't find the setting to have it confirm before dialing. Is there an option she's missing?

View 12 Replies View Related

Copyrights 2005-15, All rights reserved