Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,536 Members 52,930 Now Online
XDA Developers Android and Mobile Development Forum

Glitches in MP3 Playback

Tip us?
 
Dodge DeBoulet
Old
(Last edited by Dodge DeBoulet; 26th April 2014 at 06:32 PM.)
#1  
Senior Member - OP
Thanks Meter 14
Posts: 103
Join Date: Mar 2012
Default Glitches in MP3 Playback

Hardware: Verizon HTC One M8, Gunmetal Gray, with a Sandisk Ultra 64GB microSDHC card (Class 10)
Modifications: Rooted, S-OFFed, TWRP 2.7.0.2 and ViperOne(M8) installed @ version 1.3.1, Firmware, Radios and hboot updated from Santod's uploads. Installed Viper4Android FX v2.3.3.0, using "High" quality driver. I've modified the EQ curve a bit, but made no other changes to effects. It's only enabled for headphones.

Problem: Occasional glitches when listening to MP3s via Google Music (and only experienced when using headphones so far). I'm not playing from the cloud; the MP3s are stored on the microSDHC card. Seems to occur every 20 minutes or so, within the first 10-30 seconds of the start of an MP3. It's not at the same point each time, and I can't repeat it on demand or I would assume it's a bad copy of the file. The glitch is a very brief but very noticeable gap/hesitation in the file that's playing, like it's rebuffering or something. It only lasts a tenth of a second or so, but that's plenty long enough to be noticed.

I'm tending to think it's a problem with Viper4Android; next step is to uninstall it and see if things improve. Not sure what I'm going to do for EQ without it, though.

If anyone has thoughts to share, they'll be appreciated.
 
broprah
Old
(Last edited by broprah; 26th April 2014 at 08:36 PM.)
#2  
Senior Member
Thanks Meter 61
Posts: 172
Join Date: Apr 2011
Location: Danbury CT
I've been experiencing the same thing. I've tried several different audio players but there's little difference; there are skips in tracks played off external storage. I'm on stock rom, with faux kernel. I experienced this with a completely stock device. My gut feeling is that the issue lies in the sd card, I have been trying different i/o schedulers and read ahead cache values. Some combinations have helped slightly but not enough to eradicate the issue, it could even just be coincidental.

I'm going to go ahead and say it has nothing to do with the rom, and it shouldn't be a cpu issue like I've seen on other devices since the glitch occurs regardless if the phone is awake or not.
The Following User Says Thank You to broprah For This Useful Post: [ Click to Expand ]
 
krazie1
Old
#3  
krazie1's Avatar
Recognized Contributor
Thanks Meter 4568
Posts: 3,683
Join Date: Jun 2010
Same here, playing off the sd card it will skip

Sent from my HTC6525LVW using Tapatalk
The Following User Says Thank You to krazie1 For This Useful Post: [ Click to Expand ]
 
Dodge DeBoulet
Old
#4  
Senior Member - OP
Thanks Meter 14
Posts: 103
Join Date: Mar 2012
Quote:
Originally Posted by broprah View Post
I've been experiencing the same thing. I've tried several different audio players but there's little difference; there are skips in tracks played off external storage. I'm on stock rom, with faux kernel. I experienced this with a completely stock device. My gut feeling is that the issue lies in the sd card, I have been trying different i/o schedulers and read ahead cache values. Some combinations have helped slightly but not enough to eradicate the issue, it could even just be coincidental.

I'm going to go ahead and say it has nothing to do with the rom, and it shouldn't be a cpu issue like I've seen on other devices since the glitch occurs regardless if the phone is awake or not.
Quote:
Originally Posted by krazie1 View Post
Same here, playing off the sd card it will skip

Sent from my HTC6525LVW using Tapatalk
Wow, so I'm not alone. I'm surprised I didn't find more hits on this issue when I searched; perhaps my google-fu is weak.

I couldn't imagine it being hardware related; this thing is orders of magnitude more powerful than any of my old MP3 players. I guess I'll live on the bleeding edge with ROMs and new kernels to see if it clears up. Thanks for your feedback!
 
ReyStunner
Old
#5  
Member
Thanks Meter 13
Posts: 65
Join Date: Apr 2013
Happens on my stock rooted/s-off using Poweramp
 
jshap70
Old
#6  
Member
Thanks Meter 9
Posts: 40
Join Date: Apr 2014
Location: Indianapolis
I'm pretty sure it has to do with the CPU being used too much. I was messing around with different clock speeds and trying to see how low I could take it and still be usable, and the lower I got, the more and more glitches came up.

Also, it is not just for mp3's. I get the glitches on spotify too, so I'm assuming it has to do with the overall audio output process, not just the reading of music files.
 
broprah
Old
#7  
Senior Member
Thanks Meter 61
Posts: 172
Join Date: Apr 2011
Location: Danbury CT
Quote:
Originally Posted by jshap70 View Post
I'm pretty sure it has to do with the CPU being used too much. I was messing around with different clock speeds and trying to see how low I could take it and still be usable, and the lower I got, the more and more glitches came up.

Also, it is not just for mp3's. I get the glitches on spotify too, so I'm assuming it has to do with the overall audio output process, not just the reading of music files.
I'm inclined to say it is not a cpu issue, as I haven't encountered any problems using music stored on the internal memory.
 
Dodge DeBoulet
Old
#8  
Senior Member - OP
Thanks Meter 14
Posts: 103
Join Date: Mar 2012
I've been giving this issue some thought, and did a little research (probably not enough to talk authoritatively, though ). I've come up with the following observations:
  1. This issue appears to have surfaced with Kit Kat.
  2. Wiith Kit Kat, Google made some significant changes to the handling of external/removable SD-cards; no more direct write access to them from applications.
  3. A lot of media player applications were "broken" by KitKat and needed to be redesigned to support the new restrictions.
  4. The standard protocol for moving files to the removable SD-card is now MTP.

Which raises the following questions, at least for me:
  • Does this mean that MTP is the protocol for accessing MP3/media files from player apps, and therefore there's now an arbitrator/server in between the filesystem and media players?
  • Now that direct write access to SD-cards has been restored via an edit to /system/etc/permissions/platform.xml, is there a chance that an older MP3 player may have better luck playing MP3 files, given that it would probably use direct filesystem access vs. going through MTP (if in fact MTP is used for "new" applications)?
 
NoFanboy
Old
#9  
NoFanboy's Avatar
Senior Member
Thanks Meter 34
Posts: 245
Join Date: Oct 2013
Location: I should go outside...
So it's not just me? It doesn't happen as often for me after the ota

Sent from my HTC6525LVW using Tapatalk
 
broprah
Old
#10  
Senior Member
Thanks Meter 61
Posts: 172
Join Date: Apr 2011
Location: Danbury CT
Quote:
Originally Posted by Dodge DeBoulet View Post
I've been giving this issue some thought, and did a little research (probably not enough to talk authoritatively, though ). I've come up with the following observations:
  1. This issue appears to have surfaced with Kit Kat.
  2. Wiith Kit Kat, Google made some significant changes to the handling of external/removable SD-cards; no more direct write access to them from applications.
  3. A lot of media player applications were "broken" by KitKat and needed to be redesigned to support the new restrictions.
  4. The standard protocol for moving files to the removable SD-card is now MTP.

Which raises the following questions, at least for me:
  • Does this mean that MTP is the protocol for accessing MP3/media files from player apps, and therefore there's now an arbitrator/server in between the filesystem and media players?
  • Now that direct write access to SD-cards has been restored via an edit to /system/etc/permissions/platform.xml, is there a chance that an older MP3 player may have better luck playing MP3 files, given that it would probably use direct filesystem access vs. going through MTP (if in fact MTP is used for "new" applications)?

You're doing god's work, man. It would certainly make sense if mtp was the reason behind all of this, as mtp is generally broken and incapable of parallel tasks. Perhaps, then, there is some kind of operation that the OS is performing at fairly regular intervals that disrupt what should otherwise be a simple read. Media scanning? Entropy generation? I'm not really sure, but clearly there is something silly going on in the I/O. Maybe a programmer like @SSukk could shed light on this

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Return to Outer Space Outer Space with Ship Up Game

Since the release of Flappy Birds, we’ve had the “fortune” to see … more

Device Review: OnePlus One

Seemingly every day, there are a bunch of new devices being released. Some are budget devices and some are … more

Browse the Internet with the Innovative Atlas Web Browser

For the most part, Chrome, Firefox, and Dolphin Browser have no real rivals among … more

Choose from Over a Thousand Battery Styles with 3Minit Battery Mod

The battery style in stock Android looks pretty dull. It doesn’t … more