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

Android :: Cupcake (API3) pause / stop sound loops in 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 :: 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 :: 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 :: 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 :: Sound Loop - With Pause In Between

Sep 26, 2010

I have String Array with some strings in it [UP,L,R,R...] and I have some sounds (audio_up.mp3, audio_l.mp3 and so on). I want go through all the strings in the array and play sounds accordingly with pause in between (let's say 1 second).

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

View 4 Replies View Related

Android :: How To Pause And Stop A Changing ImageView

Mar 18, 2010

I have an ImageView in which the picture switches every 5s, i am trying to add a pause and resume button that can stop and restart the action. i am using a Handler, Runnable, and postDelay() for image switch, and i put the code on onResume. i am thinking about using wait and notify for the pause and resume, but that would mean creating an extra thread. so far for the thread, i have this:

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


And in the main activity's onCreate():

CODE:.......

The pause button seems to work, but then after that i can't press any other button, such as the resume button.

View 2 Replies View Related

General :: Music Play / Pause (Stop) On Charge

Jul 12, 2012

Currently android devices play/pause on audio cable plugin. But I need it to do the exact same thing with the charge cable. Mainly because I use a dock for music playback on one of my stereo's and would like to just drop it into the dock and it will start playing, or pull it and it will pause

View 1 Replies View Related

Sprint HTC Hero :: Stop / Pause Running App When PHONE CALL Comes In?

Jul 26, 2010

If I'm using like Google Listen's Podcast app, or a music app, is there some option to get those to pause or turn off when a phone call comes in?

View 2 Replies View Related

Stop Sound With Media Player After Clicking Another Sound Button

Aug 2, 2012

how can i stop sound with media player after clicking another sound button? and how can i set alarm/ringtone/notification when long press adding admob on my app, ive read all posts i could google but still i get errors,\

code:
final MediaPlayer sound01 = MediaPlayer.create(this, R.raw.sound01);
Button s01 = (Button) findViewById(R.id.button01);
s01.setText(this.getString(R.string.quote01));
s01.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
[code]....

View 1 Replies View Related

Android :: Stop Sound Notification - Let It Only Play Once

Jun 24, 2009

Since i don't want to have double entries, but would like a fast spreading, here's my post:
http://groups.google.com/group/android-beginners/browse_thread/thread...

View 2 Replies View Related

Android :: Way To Stop Playing Music / Sound Of Other App?

Jan 28, 2010

I want to know that can we stop playing sound or music of other application which actually plays the music from our application? Something like get the handle of MusicPlayer or AudioManager in our application and using this handle stop the currently playing sound.

View 9 Replies View Related

Android : Stop Camera Click Sound Pro Grammatically In Phone

Oct 20, 2009

I am using android's default camera to click images from within my app. I want to stop the click sound that it does on clicking an image. Is there a way to stop that click sound pragmatically?

View 3 Replies View Related

HTC EVO 4G :: Stop Boot Up Sound

Jul 1, 2010

Way to stop that obnoxious boot up tune when my evo boots?

View 3 Replies View Related

HTC EVO 4G : Way To Stop Sound From Automatically Playing In MMS Messages?

Oct 21, 2010

I hope nobody's already answered this somewhere -- I've been searching for a few days now with no luck. I'm wanting to disable the audio in received mms messages. I absolutely loath those messages that scream, blare music, say offensive stuff, etc. With my old Lotus, you actually had to choose to play the attached audio, but I can't find anything anywhere to set this on my new Evo. If anyone knows how to either make the audio in messages manual instead of automatic, or just disable their audio completely, I'd be eternally grateful to learn this!

View 7 Replies View Related

Android :: Make Gapless Music Loops In Mp3?

Jan 10, 2010

Does anyone know how to make a music loop in mp3? I have the loop in OGG and it plays perfectly, when I convert it to MP3 there is some silence at the end of the loop before it starts again.

I understand MP3 does not natively support gapless playback however I know there are some hacks to make it happen. i.e http://www.compuphase.com/mp3/mp3loops.htm

However the utility in the above website didn't work for me.

Basically I am trying to convert my music into a format supported by both iphone and android. iphone does not play OGGs unfortunately. Any ideas how to get the mp3 gapless? Or alternatively is there another music format that is gapless and supported by both iphone and android?

View 3 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 :: Lanyard Loops - Important To Portable Gadgets

Jan 20, 2010

It bugs me that some phones are omitting the lanyard loops. Look at the Nexus One that doesn't have it: http://gizmodo.com/5451349/look-at-this-broken-nexus-one

iPhone didn't have it.

Pretty lame that some phones now are designed without this feature.

View 13 Replies View Related

HTC Droid Eris : How To Stop Sound When Typing Phone Number?

Mar 29, 2010

All of a sudden when I type a phone number, I get sound when I press the numbers.. I know I had shut this off before but cant figure out where...

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

HTC Droid Eris : Videos Stop Playing After 1-2 Seconds But Sound Doens't

Jan 6, 2010

I loaded about 4 gigs worth of videos (About 160 different clips) onto my 8 gig SD card. When I try to play a video, the video freezes after about 1-2 seconds, but the sound keeps playing. Is there any way to solve this? There's just over 3 gigs of free space on the card.

View 16 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

Jelly Bean :: Galaxy S3 Running 4.3 / How To Stop Vibration And Making Notification Sound

Dec 22, 2013

I recently updated my S3 to run Jelly Bean 4.3, and now when I receive a text it both vibrates and plays the notification sound rather than just the notification sound as it used to. I can't seem to find a way to turn this off?

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

HTC Droid Eris :: Ringtone Doesn't Stop / Edit Keyboard Input Sound When Typing - Resolve These?

May 9, 2010

Just wondering if there is anyway to set my phone in such a way that my ring tone will turn off when I open the phone (either unlock/ do anything to the phone). As it is right now my ring tone (a full mp3 song imported from my pc) will play until I drag down my notification bar. I'm using tone picker and handcent sms if it makes any difference.

Also, is there a way to edit the the keyboard input sound when typing with the stock keyboard?

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

HTC Eris :: Flashing ROMs - Got Stuck In Boot Loops

Nov 19, 2010

I rooted my phone using erisuser1's rooting for dummies method - this went off without a hitch, I followed the instructions to the T. I put several custom ROMs on my SD card (using the USB, and properly ejecting the phone as a drive) including KaosFroyo v37 and v38, CELBFroyo 3.6, PlainJaneT2_V2, and Vanilla_Tazz_19.I tried flashing each of them (following the wipe of the system info and the Dalvik cache) and all but the PlainJane got stuck in bootloops that lasted a long time. I waited anywhere from 15 minutes to a few hours, and none of the others ever loaded up. I'm fine using the PlainJane and happy to have the other features of root but am wondering if there's any advice or suggestions as to why none of the other ROMs worked for me?

View 24 Replies View Related







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