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.

Android :: sound effect using SoundPool


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:

CODE:..........

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 :: 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

HTC Droid Eris :: Haptic Feedback Sound On Keyboard Effect Battery Life

Feb 5, 2010

Does haptic feedback (vibrate) and sound on the keyboard. Really effect the battery life? I have the feedback off because of typing lag, but like having the sound on.

View 2 Replies View Related

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:

soundPool.play(soundId, 0.9f, 0.1f, 0, -1, 0.7f);
soundPool.play(soundId, 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 :: 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 : 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.

View 3 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);
ringPhone.play(soundID, 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){ _soundPool.play(_playbackTimer, 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); ringPhone.play(soundID, 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 :: SoundPool.play() Audio Channels Swapped On 1.1 Emulator?

May 20, 2009

I just found that left/right channels are swapped when calling SoundPool.play(int 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 :: 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 :: SetImageMatrix Has No Effect?

Aug 27, 2009

I'm trying to scale/rotate an image using setImageMatrix, and it seems to have no effect. I've done a lot of Googling and found some people mentioning similar problems, but found no solution.

View 2 Replies View Related

Android :: RTSP Streams Play Only Sound - While Local Does Video And Sound

Jul 10, 2010

In my application, RTSP streams play only sound without video, but if i specify the video path as a local file, it plays the video and audio.

How would i get the RTSP streams to show video?

CODE:.................

View 2 Replies View Related

Android :: Shape Glass Effect

Aug 11, 2010

I've created a custom toolbar using a gradient inside a shape. It looks very nice, but since we only have the option for 3 colors (startColor, centerColor, endColor) it looks very round. I would like to do a glass effect, which requires a sharp change in color in the middle. Basically I need 4 colors (startColor, justabovecenterColor, justbelowcenterColor, endColor). Now I could have two shapes sitting on top of each other to get this effect, but I don't want to do this. I'm getting into some tricky UI customization here and that would be very difficult to manage on different sized screens.

View 1 Replies View Related

Android :: Bouncing ListView Effect

Aug 31, 2009

I was interested in making a springy-bouncing effect for ListViews similar to one in iphone.I wanted to make sure about a few things before implementing it.

1). Does Android provide this feature somewhere in the new Donut version thats coming out?(so that i don't have to re-invent the wheel)

2). Do Google plan to add this feature in any future versions of the SDK?

View 4 Replies View Related

Android :: Deep Effect In Gallery?

Sep 1, 2010

I am looking for Deep effect in Android gallery. i did some work around coverflow at http://www.inter-fuser.com/search/label/Coverflow but it also do scroll left and right. it does give me the idea to calculate offset top and left for each item separately but still there is no access. what i am trying to do is, when user scroll, images would scroll from deep behind the right edge to center and then to left side deep behind.i am wondering if anyone have some thought about arranging the imageView's on deep offset (something like V shape ) rather than on horizontal as it is.

View 2 Replies View Related

Android :: Water Ripple Effect

Jul 5, 2010

i am trying to create a ripple effect one similar to water live wallpaper in nexus one.please give me direction to acheive it.

View 7 Replies View Related

Android :: Anyone Can Help Me To Realize LOMO Effect?

Jul 31, 2010

I really like the LOMO effects in the second picture as shown in the following website(or just search Lomoster in android market), anyone can tell me how to realize it?

View 2 Replies View Related

Android :: Halo Effect On Pictures

Mar 15, 2009

I found an interesting tip over on the Tmobile forum that helped me out. I seam to get a real strong halo effect in my pictures from any light source, that blows out large parts of the photo. Most likely you have touched the camera lens while changing the battery or fooling about with the phone. Solution clean the camera lens and the inside and outside of the back cover. It is still far from great camera but, man, made it a whole lot better. All this time I thought it was just the crappy camera.

View 1 Replies View Related

Android :: Why Drawing In View Not Take Effect?

Mar 31, 2009

I'm trying to create a custom widget which looks lick HTML table. I chose to derive from TableLayout, which is the subclass of ViewGroup and View. What's confusing me is that the drawing I put into my override of View.onDraw did not take effect, until I moved the codes to the override of ViewGroup.dispatchDraw. I know dispatchDraw is a good place to draw something, but I'm just wondering why there's such difference in my practice?

View 3 Replies View Related

Android :: How To Save Colormatrix Effect?

Aug 2, 2009

So I have a Canvas which uses a bitmap to store the draw calls on. I have applied a ColorMatrixFilter to the underlying bitmap of the canvas. It looks awesome when on the phone and during the OnDraw calls. The ColorMatrixFilter is making the bitmap look exactly like I want it when the Canvas is drawn. Now how do I SAVE the Colormatrix effect? I normally take the underlying bitmap that is attached to the Canvas and Bitmap.Compress save it. But this method doesn't save the ColorMatrixFilter effect. How can I get the ColorMatrixFilter to actually alter the Bitmap itself so I can Bitmap.compress save the damn thing!

View 2 Replies View Related

Android :: Delay Effect To Work?

Jul 2, 2010

I am new to android development, also new to java. I have many years of experience with OO PHP, so it's not hard for me to quickly learn Java and Android, but I still don't know many things like Thread class. I just started developing a simple app. What I want to do is that when a button is clicked, then the TextView is update in this way: the background is changed to black (by default it's set to white) Then it should wait a half a second and then set the background back to white and update the text inside the TextView

Here is my code, it's inside my Activity class:
public synchronized void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.btnPlay: showNewDraw(); break; } protected void showNewDraw() { textResult.setBackgroundColor(Color.BLACK); textResult.setText("Before sleep"); try { Thread.sleep(500); } catch (Exception e) { textResult.setText("Something wrong"); } textResult.setBackgroundColor(Color.WHITE); textResult.setText("After sleep"); }

The way it works now is that it seems to actually take 1/2 second from the time the button is pressed and text is updated, but the background is not reset to black and back to white - it always stays white. Either it is being set to black and instantly reset to white or it's just never set to black. What should I do in order for the "delay" effect to work?

View 4 Replies View Related

Android :: How To Get Rid Of ListView Flicker Effect?

Oct 7, 2009

For some reason, whenever I scroll through my list of items, the background inside my listview disappears and reappears giving rise to a "flicker" effect which I don't really want. I've tried the suggestion at: http://stackoverflow.com/questions/1377336/android-make-listview-transparent but it doesn't work for some reason. Any suggestions?

View 2 Replies View Related

Android :: Layout_gravity Effect In Main.xml?

Sep 29, 2010

I have 4 buttons in a horizontal linear layout. I'd like the right edge of the 4th button to align with the right edge of the linear layout (equal to screen width) I've tried using android:layout_gravity="right" but it doesn't work - the right button is to the right of the 3rd one but not right aligned . Am I missing something obvious?

main.xml with only the relevant layout params only is:

CODE:....

This doesn't seem to match the stated behaviour for layout_gravity in the SDK reference :"Defines how to place the view, both its x- and y-axis, within its parent view group."

View 1 Replies View Related

General :: ICS (Android 4.0) Effect RAM / CPU Usage Of Neo V?

Mar 8, 2012

Does ICS (Android 4.0) effect RAM/CPU usage of NEO V?

Does it increase or decrease?

View 3 Replies View Related

Android :: Implement Flip Effect Between Activities?

Mar 20, 2009

You've probably seen the effect on the iPhone when you go to the next screen, it flips the screen, making it appear, like you just flipped over a card and a new screen appeared. There is a demo of something similar in the APIDemos (Views/Animation/ 3D Transition), but the transitions are between elements of the same page. Is there a way to implement the flip effect between Activities (in the same process)?

View 4 Replies View Related

Android :: Effect Of PostDelayed() In Activity After OnPause()?

Nov 22, 2009

I tried the following from an activity:

@Override public void onPause() { super.onPause();

postDelayed(new Runnable() { public void run() { mTextView.setText("I am paused!"); }, 10000); }

The activity, while in the background, still executes the runnable. Is this incorrect? Should we absolutely call removeCallback() from our onPause() handler to ensure that no postDelayed() runnables execute if we get paused? Or is it necessary to do this only in onDestroy()?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved