pmarks-net / chromadoze

Noise spectrum generator for Android
GNU General Public License v3.0
91 stars 14 forks source link

AudioTrack bugs out after 7 hours on some devices #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A user reported the following:

"One bug I've noticed on several devices however, is that after about 7 hours 
of playback the sound suddenly begins to shudder quite dramatically"

This amount of time is suspiciously close to 4 gigabytes of data:

http://www.wolframalpha.com/input/?i=4GiB+%2F+%284+bytes%2Fsample+*+44100+sample
s%2Fsecond%29

If you've seen this bug, then please post:
- The brand/model of your phone
- The Android version and Build number from Settings > About

Original issue reported on code.google.com by sparkm...@gmail.com on 12 Jul 2014 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by sparkm...@gmail.com on 12 Jul 2014 at 7:12

GoogleCodeExporter commented 9 years ago
hmmm suspiciously close to 80 half lives of Uranium...

Hi guys, I reported the issue. I am able to reproduce it on a Google Nexus 7 
(2012) with Kit-kat; a Samsung S3 mini running Jelly bean 4.1.2; and a Huawei 
y220 running Gingerbread 2.3.6.

Original comment by johannei...@gmail.com on 13 Jul 2014 at 8:10

GoogleCodeExporter commented 9 years ago
I left my Droid, Nexus S, and Galaxy Nexus running for ~24 hours, and saw no 
signs of this problem.

It seems strange that you could be seeing it across such a wide variety of 
devices.  Are you running any sort of audio manipulation app on all of them?

Could you get a recording of the sound and post it here?  (Or link to YouTube, 
etc.)

While it's happening, try these changes in order, and note which one causes the 
problem to stop:
- Draw a different spectrum
- Change the Amplitude Wave sliders
- Turn on "Reduce Volume" and change the slider
- Press Stop/Play

Original comment by sparkm...@gmail.com on 13 Jul 2014 at 7:57

GoogleCodeExporter commented 9 years ago
https://youtu.be/ZE2skmbOyBs

Here's a video I shot this morning. I started filming after changing the 
settings had no effect (so reduce volume was not activated during the night).

Original comment by johannei...@gmail.com on 18 Jul 2014 at 6:28

GoogleCodeExporter commented 9 years ago
Wow, your video shows that the problem persists even after pressing Stop/Play.  
That rules out most of the possible workarounds I had in mind.

Now I'm wondering what it actually takes to kill this thing.  Try the following:

Approach 1:
- Press stop
- Return to the home screen
- Launch Chroma Doze
- Press play

Approach 2:
- Press stop
- Open the recent apps list
- Swipe Chroma Doze off to the side
- Return to the home screen
- Launch Chroma Doze
- Press play

Approach 3:
- Go to Settings > Applications
- Find Chroma Doze
- Press "Force Stop"
- Return to the home screen
- Launch Chroma Doze
- Press play

If *that* doesn't work, you could try throwing in:
- Clear cache
- Clear data
- Reboot the phone
- Sacrifice a goat

Original comment by sparkm...@gmail.com on 18 Jul 2014 at 7:01

GoogleCodeExporter commented 9 years ago
Haha. Great. I did find that after I pushed stop, and then restarted after 
about a minute it had returned to normal.

Original comment by johannei...@gmail.com on 18 Jul 2014 at 7:28

GoogleCodeExporter commented 9 years ago
I created a test build that runs the sound generator in a separate process, and 
kills it whenever you press "Stop".

It's not complete (the progress bar doesn't update), but I'd be interested to 
know if quickly pressing Stop/Play fixes the audio problem on your devices.

Original comment by sparkm...@gmail.com on 28 Jul 2014 at 2:48

Attachments: