Android API : The SoundPool class manages and plays audio resources for applications
Questions tagged [soundpool]
594 questions
0
votes
1 answer
Detect if sound is playing/managing toggle button
I am having trouble figuring out how to manage a togglebutton that turns music on/off. When a user clicks it on, it should just loop continuously until it is turned off. I am using soundpool, if there was someway i could detect if my media was…

Finding Nemo 2 is happening.
- 1,560
- 3
- 14
- 28
0
votes
2 answers
How do I stop the sound restarting when a collision occurs
Currently my code plays a sound when there is contact between any objects in my game using andEngine and Box2D and the walls, the problem I have is that when contact is made with any objects it starts again I understand why this is happening. What I…

bobthemac
- 1,172
- 6
- 26
- 59
0
votes
1 answer
Android - Disabling sound on start up screen
I have a splash screen for my application that plays an mp3 clip on start up.
I want to give the user the option to disable/enable sound via a settings menu of my app. How can I implement this so that application remembers the user's preference…

tiptopjat
- 499
- 3
- 13
- 24
0
votes
0 answers
How to tell if a sound is still playing in soundpool
I wish to play series of sounds using soundpool, but want to wait till each sound has completed before starting the next one. I can not find any .isPlaying() type function. Is there one?

Mick
- 8,284
- 22
- 81
- 173
0
votes
1 answer
Forever playing without pause in Android
I have a problem. When I try to play sound using Soundpool there is small pause between each playing.
For example, I have 2 sec-sound which I want to play when button is pressed.
I tried to start 2 threads with the same sound. Second started 0.5 sec…

Lazy Beard
- 305
- 3
- 10
0
votes
1 answer
Android: How to know that playback of the SoundPool has ended?
Maybe anybody faced with this issue.
I use SoundPool for playing sounds in my app.
After playing the sound I need to do further action. But how can I determine that the sound has stoped?
All the sounds in the app have a different length, so I can…

dimetil
- 3,851
- 2
- 29
- 47
0
votes
1 answer
Android: SoundPool not working after App gets terminated
I've noticed a strange problem: My app uses SoundPool to play sounds. When I terminate the App with the back key while some sounds are playing, SoundPool will not work correctly the next time I start the App (even if I start another App that uses…

osiris81
- 487
- 4
- 15
-1
votes
1 answer
How i can pass Frequency into the (Rate) parameter in soundpool class
Is there any method to add rate as an frequency in soundpool class. Here is my code.
how can i pass hz(frequency at place of 1f that is rate.
fun playSound(v: View) {
when (v.getId()) {
R.id.button_sound1 -> {
…

slahuden akram
- 1
- 2
-1
votes
1 answer
SoundPool plays sound only the first time, when it is called
I need to use soundPool in my app.
The problem is that the sound is only played the first time I launch the app on the emulator. Then I have to uninstall the app to test again.
The boo.mp3 file is 213Ko What I am missing? any idea most…

LastCard1440
- 1
- 1
- 2
-1
votes
1 answer
java.lang.IllegalStateException with mediaPlayer
I am building an educational app for children and I am using mediaplayer for the sound of letters and the alphabet song, but the app crashes sometimes when I call the .stop() function.
The Error massage is
at android.media.MediaPlayer._stop (Native…

Ahmad Alotaibi
- 1
- 1
-1
votes
2 answers
App stop working after button click
so I´m making an app with fragments and I want a sound on button click. Everything works except when I click on the button the app stop working. I put an onclick method named playAnother on the button. I think the problem might be there in .java…

Martin Šebeň
- 23
- 1
- 3
-1
votes
1 answer
Playing multiple SoundPool at the same time
I have a activity that i'm using 12 button with different sound at them. Buttons should be play at the same time if user click both of them at once.
When i use MediaPlayer i couldn't manage to do this , then i learned about SoundPool and everything…

Furkan Elci
- 1
- 5
-1
votes
1 answer
Increase Media Playback Speed in Android[Sound pool doesn't work]
I am creating a Media Player app. Everything is working fine but I want to give option to increase playback speed, for eg. 1.5x,2x etc. I saw few Stack Overflow questions and they all suggested to use Sound Pool for this as Media Player doesn't…

Vivek Mishra
- 5,669
- 9
- 46
- 84
-1
votes
1 answer
How to play .wav file attached to (Voice over IP) voice-mail files in Android?
need to play .wav file (attached to a voicemail) in a device with Android 4.3.1 (API 18) installed.
I am aware that there are some app like 'remote wav' that are able to play .wav file however I need to make this inbuilt feature for my app.
any help…

bastami82
- 5,955
- 7
- 33
- 44
-1
votes
1 answer
Sound Pool in android
I trying to make an app, with a lot of short sounds(more than 20), using Sound Pool.
But when i load that sounds, it take like 3-10 sec to load it.
How can i improve speed of loading?
Here is Function of loading
private int loadSound(String…

Василий Богданец
- 89
- 1
- 8