Fixed
Status Update
Comments
ml...@gmail.com <ml...@gmail.com> #2
I'm observing the same thing on the Nexus 10.
pe...@gmail.com <pe...@gmail.com> #3
Sleep as Android users who upgraded to 4.3 recently report the same issue. It seems SoundPool looping is broken in 4.3...
pe...@gmail.com <pe...@gmail.com> #4
I can approve the issue is reproducible on the 4.3 emulator. Unfortunately no hint in in the logcat related to audio or sound pool which would give further insight. The only think I'm getting releted to SoundPool every time I try using it is:
07-29 12:19:43.844: ERROR/SoundPool(296): error loading /system/media/audio/ui/KeypressReturn.ogg
07-29 12:19:43.864: WARN/AudioService(296): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
07-29 12:19:43.814: WARN/AudioService(296): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-29 12:19:43.814: ERROR/SoundPool(296): error loading /system/media/audio/ui/Effect_Tick.ogg
...
07-29 12:19:43.864: WARN/AudioService(296): onLoadSoundEffects(), Error -1 while loading samples
07-29 12:19:43.844: ERROR/SoundPool(296): error loading /system/media/audio/ui/KeypressReturn.ogg
07-29 12:19:43.864: WARN/AudioService(296): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
07-29 12:19:43.814: WARN/AudioService(296): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-29 12:19:43.814: ERROR/SoundPool(296): error loading /system/media/audio/ui/Effect_Tick.ogg
...
07-29 12:19:43.864: WARN/AudioService(296): onLoadSoundEffects(), Error -1 while loading samples
pe...@gmail.com <pe...@gmail.com> #5
I did try a non -1 looping parameter and it seems even finite looping is broken. Did someone had a chance to look at the 4.3 sources for SoundPool? Thanks.
no...@gmail.com <no...@gmail.com> #6
Incorrect behaviour also on Nexus 7 since 4.3.
Easy to reproduce, Code nearly as above:
https://play.google.com/store/apps/details?id=nax.naxan.virtualfan
(in Mode Soundpool on 4.3 only one loop is played, on 4.2 it's looping)
Addition:
The code in 4.2.2 looks like looping is done in the native part:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/media/SoundPool.java/
Easy to reproduce, Code nearly as above:
(in Mode Soundpool on 4.3 only one loop is played, on 4.2 it's looping)
Addition:
The code in 4.2.2 looks like looping is done in the native part:
or...@bengigi.com <or...@bengigi.com> #7
I'm having the same problem, loop will only play once :\
pp...@googlemail.com <pp...@googlemail.com> #8
[Comment deleted]
pp...@googlemail.com <pp...@googlemail.com> #9
Same here, I've only managed to solve it by using MediaPlayer instead, although I think the looping sounds clunkier.
el...@gmail.com <el...@gmail.com> #10
Got the same problem on Gnex 4.3, can't use the MediaPlayer since I need the setRate Method for car engine pitch modification.
90% of car/bike games on the play store have their engine sound effect broken on 4.3 due to this.
90% of car/bike games on the play store have their engine sound effect broken on 4.3 due to this.
je...@gmail.com <je...@gmail.com> #11
The same for nexus 7.
th...@gmail.com <th...@gmail.com> #12
Same for Nexus 4 and Nexus 7 with Android 4.3. Audio in Android is a big mess..... ;/
no...@moroze.com <no...@moroze.com> #13
Same problem on a Nexus 7, both infinite and finite looping are not working. The same code works on a phone running 4.2.2.
sp...@gmail.com <sp...@gmail.com> #14
[Comment deleted]
ma...@gmail.com <ma...@gmail.com> #15
Yes I get this issue on nexus 7 4.3
do...@gmail.com <do...@gmail.com> #16
Having the same problem 2 please fix this
gm...@gmail.com <gm...@gmail.com> #17
Same issue 36907002 Nexus 7 running 4.3
di...@gmail.com <di...@gmail.com> #18
Needs fixing.
cp...@gmail.com <cp...@gmail.com> #19
Must be fixed
au...@gmail.com <au...@gmail.com> #20
plz fix
ne...@gmail.com <ne...@gmail.com> #21
Why did you not find this in testing? Please fix. Thanx
lu...@gmail.com <lu...@gmail.com> #23
Needs fixing
um...@gmail.com <um...@gmail.com> #24
Fix it please!
se...@gmail.com <se...@gmail.com> #25
Must be fixed, please fix it
am...@gmail.com <am...@gmail.com> #26
Even i am facing same problem..PLease fix it. It has ruined sound effects in my app.
[Deleted User] <[Deleted User]> #27
Please fix ASAP!
j....@gmail.com <j....@gmail.com> #28
Same issue on Google nexus tablet....please fix it.
zo...@gmail.com <zo...@gmail.com> #29
Here we go again... Perfectly working apps now useless, end users complaining, leaving negative comments. Don't they care about the Android brand? Please fix ASAP!
di...@gmail.com <di...@gmail.com> #30
Don't know if Google is seeing this but it still in a need of a fix!
ba...@gmail.com <ba...@gmail.com> #31
A fix should not be accepted unless at least 5 tracks can handle both rate and volume adjustments at least every 250ms. This worked before on the majority of devices (have >1 million installs) and should be part of testing.
This is a very common use-case for games for realtime doppler and volume/distance effects of looping sounds (wind, engine, engines of nearby objects).
This needs to be upped to high-priority and fixed before 4.3 gets rolled out by more HW vendors which often lag behind 6-18 months with update roll-outs due to own android 'flavors/skins'. This can cause a whole generation of devices not to work with (ten)thousands of apps which would mean significant economical damage (semi-permanent due to ratings drop) to any app using a engine which uses OS provided sounds system (which under normal circumstances would be the recommended way to go).
This is a very common use-case for games for realtime doppler and volume/distance effects of looping sounds (wind, engine, engines of nearby objects).
This needs to be upped to high-priority and fixed before 4.3 gets rolled out by more HW vendors which often lag behind 6-18 months with update roll-outs due to own android 'flavors/skins'. This can cause a whole generation of devices not to work with (ten)thousands of apps which would mean significant economical damage (semi-permanent due to ratings drop) to any app using a engine which uses OS provided sounds system (which under normal circumstances would be the recommended way to go).
sv...@gmail.com <sv...@gmail.com> #32
Same issue here
hm...@gmail.com <hm...@gmail.com> #33
I cant play my games! Please fix this!
lu...@gmail.com <lu...@gmail.com> #35
Please fix
[Deleted User] <[Deleted User]> #36
Adding my vote on the "must-be-fixed" side
cr...@gmail.com <cr...@gmail.com> #37
Please fix
ke...@gmail.com <ke...@gmail.com> #38
Thank you for looking into it.
sv...@gmail.com <sv...@gmail.com> #39
Thank you, gkas...
I hope Android team will manage to fix it ASAP.
I hope Android team will manage to fix it ASAP.
ha...@google.com <ha...@google.com> #40
Hello,
We are aware of the issue and working on a fix.
For existing 4.3 devices, we may need to request to have a workaround in your code.
I will update on this thread.
Sorry for an inconvenience.
Regards,
We are aware of the issue and working on a fix.
For existing 4.3 devices, we may need to request to have a workaround in your code.
I will update on this thread.
Sorry for an inconvenience.
Regards,
gk...@google.com <gk...@google.com> #41
Platform source code patch available at AOSP:
https://android-review.googlesource.com/#/c/63426/
We will tell AOSP device partners about the availability of this patch.
I am unable to give a schedule for a platform build that will contain this fix.
For developers working with platform builds that lack this fix,
we'll try to suggest workarounds as mentioned at #39, on this thread.
We will tell AOSP device partners about the availability of this patch.
I am unable to give a schedule for a platform build that will contain this fix.
For developers working with platform builds that lack this fix,
we'll try to suggest workarounds as mentioned at #39, on this thread.
ar...@gmail.com <ar...@gmail.com> #42
Thanks for looking into it :)
co...@gmail.com <co...@gmail.com> #43
Please post updates on the work around from #40 if possible.
pa...@gmail.com <pa...@gmail.com> #44
Please fix it asap in 4.3.x update since at least 3 apps have the pb on my Nexus 7 :
- Hill Climb Racing ( motor sound disappear after 0.5 second )
- Drag racing ( motor sound disappear after 0.5 second )
- SongPop ( running yellow VIP stars does not make any sound since 4.3 )
Thanks
- Hill Climb Racing ( motor sound disappear after 0.5 second )
- Drag racing ( motor sound disappear after 0.5 second )
- SongPop ( running yellow VIP stars does not make any sound since 4.3 )
Thanks
ha...@google.com <ha...@google.com> #45
As it has been reported, we found that there is an issue in a looping in SoundPool API in JB 4.3.
Here is a detail of the issue:
Issue: Looping specified in SoundPool::play, SoundPool::setLoop does not work
WorkAround: Unfortunately there is no direct workaround in SoundPool API.
For a looping sound, please use audioTrack(Java) or OpenSL(Native)
In audioTrack, sound looping can be achieved with setLoopPoints() API call.
audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
sampleRateInHz, AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT, totalNumOfSamples,
AudioTrack.MODE_STATIC);
audioTrack.write(pcmdata, 0, pcmdata.length);
//the end frame is the length/4 if it is 16bites
audioTrack.setLoopPoints(0,pcmdata.length/4,-1);
audioTrack.play();
For compressed audio such as MP3, AAC, those need to be converted to PCM via MediaCodec etc prior to be passed to audioTrack.
The affected APIs are:
http://developer.android.com/reference/android/media/SoundPool.html#play(int ,
float, float, int, int, float)
http://developer.android.com/reference/android/media/SoundPool.html#setLoop(int ,
int)
Note:
OpenSL looping is not affected by the issue
AOSP fix is available now at:https://android-review.googlesource.com/#/c/63426/
Sorry for inconvenience.
Here is a detail of the issue:
Issue: Looping specified in SoundPool::play, SoundPool::setLoop does not work
WorkAround: Unfortunately there is no direct workaround in SoundPool API.
For a looping sound, please use audioTrack(Java) or OpenSL(Native)
In audioTrack, sound looping can be achieved with setLoopPoints() API call.
audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
sampleRateInHz, AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT, totalNumOfSamples,
AudioTrack.MODE_STATIC);
audioTrack.write(pcmdata, 0, pcmdata.length);
//the end frame is the length/4 if it is 16bites
audioTrack.setLoopPoints(0,pcmdata.length/4,-1);
audioTrack.play();
For compressed audio such as MP3, AAC, those need to be converted to PCM via MediaCodec etc prior to be passed to audioTrack.
The affected APIs are:
float, float, int, int, float)
int)
Note:
OpenSL looping is not affected by the issue
AOSP fix is available now at:
Sorry for inconvenience.
ba...@gmail.com <ba...@gmail.com> #46
Any chance that you guys at Google code up an OpenSL based alternative for SoundPool and put it in the compatibility library or on GCode/Github?
zo...@gmail.com <zo...@gmail.com> #47
Just tried audioTrack with AudioTrack.MODE_STATIC but getting clicking sound on each loop which didn't happen when using SoundPool. Tried adjusting start and end frames for both audioTrack.write & audioTrack.setLoopPoints but still clicks. Anyone else tried there suggested workaround with success? Clicks not in source wav file!
ba...@gmail.com <ba...@gmail.com> #48
@hak#44
Thank you for pointing to a work-around; I've successfully implemented this for looping sounds (caveat: have no 4.3 device to test, but on 3.x to 4.03 audiotrack seems to function o.k. so far).
It's probably a good idea to enable this workaround only on devices actually running 4.3 as AudioTrack itself might have bugs in some android versions (and/or trigger HW/driver specific issues).
@Fellow developers
Also, I decided to do a experiment and implemented a AudioTrackSoundPool (soundpool 'drop in replacement' object with interface of SoundPool but with AudioTrack as back-end to arrange the native audio stuff, both for single and looping sounds). This seems to work o.k. (not tested elaborately and only on a few devices with my app which uses 2 pools: 7 looping tracks with rate and volume effects and another 6 channel 1-offs mixer).
If anyone is interested in that code I can provide it "as-is without support/warranty" etc.; maybe it can help someone. It is limited to only .wav file uncompressed 8/16 bit Mono/stereo resources and might take some work to adhere to a specific API level interface.
Thank you for pointing to a work-around; I've successfully implemented this for looping sounds (caveat: have no 4.3 device to test, but on 3.x to 4.03 audiotrack seems to function o.k. so far).
It's probably a good idea to enable this workaround only on devices actually running 4.3 as AudioTrack itself might have bugs in some android versions (and/or trigger HW/driver specific issues).
@Fellow developers
Also, I decided to do a experiment and implemented a AudioTrackSoundPool (soundpool 'drop in replacement' object with interface of SoundPool but with AudioTrack as back-end to arrange the native audio stuff, both for single and looping sounds). This seems to work o.k. (not tested elaborately and only on a few devices with my app which uses 2 pools: 7 looping tracks with rate and volume effects and another 6 channel 1-offs mixer).
If anyone is interested in that code I can provide it "as-is without support/warranty" etc.; maybe it can help someone. It is limited to only .wav file uncompressed 8/16 bit Mono/stereo resources and might take some work to adhere to a specific API level interface.
zo...@gmail.com <zo...@gmail.com> #49
#44,Yes please, I couldn't get loop to work without click sound so your code would be great. Please send to
zoracdev@gmail.com Thanks
zoracdev@gmail.com Thanks
co...@gmail.com <co...@gmail.com> #50
I'm still getting the clicking sound on Android 4.3 :(
Did the poster in #44 run that code on Android 4.3 without issue?
Did the poster in #44 run that code on Android 4.3 without issue?
ba...@gmail.com <ba...@gmail.com> #51
#49
I cant speak for #44 but maybe some more 'data' will help; I dont have a 4.3 device, just 3.x to 4.0.3 to test on; on those it works (granted: if it doesnt on 4.3, that aint of much help).
You could try (if you have another device) with 3.x to 4.0.3 to test your code on and see if it clicks there as well or not?
Other ideas; just to trying to help:
1. if using .WAV resources, do you parse/skip the WAVE/RIFF headers?, otherwise you get clicks from them when that data used as samples.
2. try putting the sound multiple times in the buffer in a larger buffer (maybe the buffer is too short)
3. try code-generated sine wave with a frequency that perfectly aligns with both buffer ends, that ensures nothing in transition from file/format->buffer plays a part.
4. try a speech wave with "1 2 3", to see if there's any mismatch in framelength/loop point specification somewhere (something not obvious in a wave that is already repeating within the wave iself or is monotonous in nature like engine, wind, water sounds).
Zorac will try my code later, if that does click with him (it doesnt with me, with various samples and formats), then its likely AudioTrack + 4.3 and we're SOL.
I cant speak for #44 but maybe some more 'data' will help; I dont have a 4.3 device, just 3.x to 4.0.3 to test on; on those it works (granted: if it doesnt on 4.3, that aint of much help).
You could try (if you have another device) with 3.x to 4.0.3 to test your code on and see if it clicks there as well or not?
Other ideas; just to trying to help:
1. if using .WAV resources, do you parse/skip the WAVE/RIFF headers?, otherwise you get clicks from them when that data used as samples.
2. try putting the sound multiple times in the buffer in a larger buffer (maybe the buffer is too short)
3. try code-generated sine wave with a frequency that perfectly aligns with both buffer ends, that ensures nothing in transition from file/format->buffer plays a part.
4. try a speech wave with "1 2 3", to see if there's any mismatch in framelength/loop point specification somewhere (something not obvious in a wave that is already repeating within the wave iself or is monotonous in nature like engine, wind, water sounds).
Zorac will try my code later, if that does click with him (it doesnt with me, with various samples and formats), then its likely AudioTrack + 4.3 and we're SOL.
zo...@gmail.com <zo...@gmail.com> #52
Hi
Im getting NPE on first call:
streamID = MYaudioTrack.load("R.raw.c3", 1);
I've decclared the above as:
int streamID;
AudioTrackSoundPool MYaudioTrack;
and "R.raw.c3" is a wave file in res/raw as c3.wav
Any clues?
Im getting NPE on first call:
streamID = MYaudioTrack.load("R.raw.c3", 1);
I've decclared the above as:
int streamID;
AudioTrackSoundPool MYaudioTrack;
and "R.raw.c3" is a wave file in res/raw as c3.wav
Any clues?
ba...@gmail.com <ba...@gmail.com> #53
Hi,
try:
streamID = MYaudioTrack.load("raw/raw.c3", 1);
or
streamID = MYaudioTrack.load(context, r.raw.c3, 1);
Mind the quotes and difference between a path and a resourceID
context == your activity
try:
streamID = MYaudioTrack.load("raw/raw.c3", 1);
or
streamID = MYaudioTrack.load(context, r.raw.c3, 1);
Mind the quotes and difference between a path and a resourceID
context == your activity
ba...@gmail.com <ba...@gmail.com> #54
if it doesn't help, step through the code and see ;-)
Or copy-paste the stack-strace from logcat, maybe I can help from there.
Or copy-paste the stack-strace from logcat, maybe I can help from there.
zo...@gmail.com <zo...@gmail.com> #55
[Comment deleted]
ma...@gmail.com <ma...@gmail.com> #56
Hi,
i worked around this the following way, I know it's kinda ugly, but it seems to work better than I expected:
private class WorkaroundThread extends Thread {
@Override
public void run() {
while (playing) {
streamID = soundPool.play(soundID, volume, volume, 1, 0, rate);
if (!loop)
playing = false;
try {
Thread.sleep((long) (getDuration() * (1 / rate) - 100L)); // -100 ms to reduce the gaps
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
It seems to work OK as an intermediate workaround for my App (https://play.google.com/store/apps/details?id=de.bwravencl.leafblower ) on 4.3.
When changing the rate of the sound very quickly I'm getting some stutter though...
i worked around this the following way, I know it's kinda ugly, but it seems to work better than I expected:
private class WorkaroundThread extends Thread {
@Override
public void run() {
while (playing) {
streamID = soundPool.play(soundID, volume, volume, 1, 0, rate);
if (!loop)
playing = false;
try {
Thread.sleep((long) (getDuration() * (1 / rate) - 100L)); // -100 ms to reduce the gaps
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
It seems to work OK as an intermediate workaround for my App (
When changing the rate of the sound very quickly I'm getting some stutter though...
en...@gmail.com <en...@gmail.com> #57
A lot of other app use the soundpool loop. Someone knows when and if a future fix will be released?
sp...@gmail.com <sp...@gmail.com> #58
[Comment deleted]
co...@gmail.com <co...@gmail.com> #59
Is this bug fixed in the new release of Android?
ho...@gmail.com <ho...@gmail.com> #60
Just received 4.4 on my Nexus 7 and tested if this works. It doesn't.
Seems something has been done since now the sound is looped. But the loop count is wrong. If I give it a value of n the sound plays n times. But the documentation states "other values indicate the number of repeats, e.g. a value of 1 plays the audio twice".
Close, but no cigar.
Seems something has been done since now the sound is looped. But the loop count is wrong. If I give it a value of n the sound plays n times. But the documentation states "other values indicate the number of repeats, e.g. a value of 1 plays the audio twice".
Close, but no cigar.
gk...@android.com <gk...@android.com> #61
#59 - thanks for your report, will investigate
st...@gmail.com <st...@gmail.com> #62
Installing 4.4 on Nexus 7 breaks my app. Occationally sounds are looped even though loop is set to 0. This appears to happen when retriggering a sound that is already playing.
pe...@gmail.com <pe...@gmail.com> #63
Hello, it seems SoundPool is still broken in 4.4. I did not figure out exactly what are the conditions, but some samples are looping and some aren't. Out of 30 samples I tried some 8 are not looping correctly (they all are under the 100kb limit) and all of the samples which have issues are 44.1k sampling rate. This is the only think they have in common I could figure out. But on the other hand I also found one 44.1k sample which is looping fine. Any ideas?
ac...@sideprojects.com <ac...@sideprojects.com> #64
[Comment deleted]
hf...@gmail.com <hf...@gmail.com> #65
SoundPool looping is still broken in 4.4. Testing on a Nexus 5, looping only works about 20% of the time.
mo...@gmail.com <mo...@gmail.com> #66
Upgraded to 4.4.2 and still not fixed :(
sv...@gmail.com <sv...@gmail.com> #67
Yeah, still broken. 4.4.2
ce...@gmail.com <ce...@gmail.com> #68
In my nexus 4 and 7 (2012) using android 4.4.2 the loop is working.
el...@gmail.com <el...@gmail.com> #69
Hello,
On the emulator running 4.4.2, some samples ogg files are also having problems in looping, the results are consistent and 8 out of 11 sample are not looping.
The 11 samples are random and the 3 samples that are working, have nothing in common.
Any idea what are the specs of the samples that works? Anyone has an idea of the root cause?
Thank you
On the emulator running 4.4.2, some samples ogg files are also having problems in looping, the results are consistent and 8 out of 11 sample are not looping.
The 11 samples are random and the 3 samples that are working, have nothing in common.
Any idea what are the specs of the samples that works? Anyone has an idea of the root cause?
Thank you
co...@gmail.com <co...@gmail.com> #70
Based on testing of SoundPool on a number of devices, I do not see any pattern to the ones that work and the ones that don't.
At this time, we're still not using SoundPool looping on most devices (sniffing) and on the ones we are, we're cherry picking sound tracks that test to positively support looping on our reference devices.
This is a crushing blow to game developers on the Android platform and has been punishing those of us loyal to the platform for MORE THAN SIX MONTHS.
I do not think that Google is watching this bug anymore. We need to open a new one and make a big stink to get some attention.
At this time, we're still not using SoundPool looping on most devices (sniffing) and on the ones we are, we're cherry picking sound tracks that test to positively support looping on our reference devices.
This is a crushing blow to game developers on the Android platform and has been punishing those of us loyal to the platform for MORE THAN SIX MONTHS.
I do not think that Google is watching this bug anymore. We need to open a new one and make a big stink to get some attention.
co...@gmail.com <co...@gmail.com> #71
OpenSL looping is not affected by the issue...
Any chance that you guys at Google code up an OpenSL based alternative for SoundPool and put it in the compatibility library or on GCode/Github?
Any chance that you guys at Google code up an OpenSL based alternative for SoundPool and put it in the compatibility library or on GCode/Github?
el...@gmail.com <el...@gmail.com> #72
I finally tackled down the issue (at least in my code)and managed to get everything working (except on 4.3), here's how I managed to get it working (4.4 and 4.4.2 working)
In my games I use the soundPool to create sound for car engine and use the setRate method to change the rate of the Engine sound, I changed two things:
1 - I moved the call of the .Play() outside of the asynctask and moved the call to the main updateThread
2 - I prevented any call to setRate() method before the actual sound starts playing:
I had something like this:
OLD:
a. sndJetEngine.setLooping(true);
b. sndJetEngine.setRate(rate);
c. sndJetEngine.play();
And the method that updates the engine based on speed sometimes was being called before the play(), so I also prevented that.
NEW:
a. sndJetEngine.setLooping(true);
c. sndJetEngine.play();
and then I change the rate somewhere else in the update thread, making sure after the looping starts.
Recall that all calls are happening on the udpate thread, and that worked out pretty fine for all the loops.
But the thing is that devs needs to update their code, because my old code that was working on 2.3 --> 4.1 needed modification starting 4.2.1.
Hope it helps : )
In my games I use the soundPool to create sound for car engine and use the setRate method to change the rate of the Engine sound, I changed two things:
1 - I moved the call of the .Play() outside of the asynctask and moved the call to the main updateThread
2 - I prevented any call to setRate() method before the actual sound starts playing:
I had something like this:
OLD:
a. sndJetEngine.setLooping(true);
b. sndJetEngine.setRate(rate);
c. sndJetEngine.play();
And the method that updates the engine based on speed sometimes was being called before the play(), so I also prevented that.
NEW:
a. sndJetEngine.setLooping(true);
c. sndJetEngine.play();
and then I change the rate somewhere else in the update thread, making sure after the looping starts.
Recall that all calls are happening on the udpate thread, and that worked out pretty fine for all the loops.
But the thing is that devs needs to update their code, because my old code that was working on 2.3 --> 4.1 needed modification starting 4.2.1.
Hope it helps : )
gk...@android.com <gk...@android.com> #73
Thanks for your notes. I had investigated this and was unable to reproduce after the previous fix, but I'm hoping your latest information will make it easier for me to reproduce now. I'll post here when I have an update.
ma...@gmail.com <ma...@gmail.com> #74
I have a similar problem using soundpools but not while looping the system adds a hiss to some (not all) of my fx but only on my nexus 7 is fine on Sony z1 running 4.4.2 one x running 4.2.2
ro...@gmail.com <ro...@gmail.com> #75
[Comment deleted]
co...@gmail.com <co...@gmail.com> #76
Still not fixed it seems.
cu...@gmail.com <cu...@gmail.com> #77
[Comment deleted]
cu...@gmail.com <cu...@gmail.com> #78
[Comment deleted]
cs...@gmail.com <cs...@gmail.com> #79
I have find the Solution to fix the problem of looping.
Soundpools that can Loop the sound only file that size is < 1mb.
Soundpools that can Loop the sound only file that size is < 1mb.
ch...@gmail.com <ch...@gmail.com> #80
[Comment deleted]
ch...@gmail.com <ch...@gmail.com> #81
[Comment deleted]
ch...@gmail.com <ch...@gmail.com> #82
That's a requirement, yes, but the looping is repeatedly broken by various stock Android releases. With the final versions of KitKat on Nexus 5, I had to use ogg files, obviously less than 1Mb, with a sample rate of 48 kHz (instead of the usual 44.1 kHz) to get looping to work at all. The first Lollipop release broke it again, but it's working again on Nexus 5 in the latest Lollipop update.
All in all, judging by what I've experienced and read, looping samples on Android is a nightmare and it's not as simple as 'size < 1mb'. I wish it was.
All in all, judging by what I've experienced and read, looping samples on Android is a nightmare and it's not as simple as 'size < 1mb'. I wish it was.
ya...@gmail.com <ya...@gmail.com> #83
still not fixed :(
pa...@gmail.com <pa...@gmail.com> #84
still not working on 4.2 - 4.4
sv...@gmail.com <sv...@gmail.com> #85
I celebrated 58113's birthday two times already, yay! Anticipating the next one!
fl...@gmail.com <fl...@gmail.com> #86
The radar quit working for me I tried redownload restarting the phone nothing works
fu...@gmail.com <fu...@gmail.com> #87
Did you abolish rising black smoke when fighter receives damage?
fu...@gmail.com <fu...@gmail.com> #88
Fighters don't leave a smoke/ fire trail.
Please tell me how to fix this problem.
Please tell me how to fix this problem.
ng...@gmail.com <ng...@gmail.com> #89
So sad that this issue not fixed on Galaxy S9+
Description
Incorrect behavior observed on a Galaxy Nexus running JWR66V and on the emulator running the 4.3 image from the SDK. Correct behavior observed pretty much everywhere on 4.2.x and below.
The code:
SoundPool soundPool = new SoundPool(16, AudioManager.STREAM_MUSIC, 100);
soundPool.setOnLoadCompleteListener(new SoundPool.OnLoadCompleteListener() {
@Override
public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {
soundPool.play(sampleId, 1f, 1f, 1, -1, 1f);
}
});
soundPool.load(this, R.raw.sfx, 1);