For the most part playing music from within an app is simple and there are lots of ways to do it: background audio; MediaElement; or launcher.
Sometimes things go wrong though and last week was one such time. I was asked to look at a bug in a new app that plays music. The bug was that for some tracks there is an obscure error when playing from isolated storage. If the file is copied to the PC from isolated storage then it plays fine though.
In the exception, with it's entirely external call stack, we could see a HRESULT of 0xC00D36C4 or a message of -1072875836. Neither of which are particularly helpful.
Even the internet couldn't give us much help. All we could find was a constant name of MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED for the hex value but that was in a streaming video context. This didn't really help at all.
Beyond that we found records of bugs relating to playing some audio files on Windows Phones but these had all been closed and marked as "no repro".
I looked at files sizes when the tracks were downloaded on the phone and on a PC and everything looked the same.
After much experimentation I realised there was a step in our reproduction process that hadn't been fully explored.
When files are saved on the phone they were given name based on their identifier. This meant that in IsolatedStorage they looked like: "/tracks/tr123456".
When copied to the PC we were renaming the file to include an extension (of ".mp3") so we could double click them to try and start playback.
Starting to approach the limit of possibilities, I wondered what would happen if we tried to play the file with the ".mp3" extension on the phone. Low and behold the track started playing on the phone without issue.
So, the fix?
Just make sure that the files all had a ".mp3" extension on them and they all played fine. Yes, really that simple.
Why does this solution work?
Here's what I think is happening:
Without a file extension to tell the internal media stack what format the file is it guesses, probably based on looking at part of the files contents. In the instances where the file will not play correctly it is probably assuming that it is not a regular MP3 file, even though it is, and so tries to play it assuming a different format.
I must admit that my knowledge of the internals of the MP3 format is non-existent and my knowledge of the internals of the media playback stack is even smaller but this seems to be the most likely theory.
What can we learn from this?
Always include a file extension on your files. Not only does it make it easier/clearer for people to see what type they are, it also help the OS know how to read/play/process them.
ReplyDeleteSubsequent to installing the ultra-modern variety in your follow restore typically the gaskets not to mention restore the outcome spine. Make certain typically the tag heuer replica sale follow might be missions previously switching the outcome spine. It again definitely isn't a good idea to change typically the variety exclusively on your own for the reason that these are definitely sophisticated timepieces. And yet for everybody who is convinced that anyone can take on the job as they are calm not to mention peaceful an adequate amount of typically the rolex replica sale financial risk is valued at the dollars you will put away to compensate you to definitely restore typically the variety suitable for you. Ensure you destination some light small cloth downwards before commencing in order that this is not to abrasion the facial skin of this follow not to mention have a smallish screwdriver. In the home . recommended that you pay for numerous supplement iwc replica uk gaskets in the case many destroy when ever wiping out not to mention ensure you chose the best particular variety for ones style of Gucci follow you possess. Having electricity items happens to be an inevitable matter through modern society. Throughout louis vuitton replica sale when real, we've been encircled from electro-magnetic spheres assigned apart from items prefer microwaves, cell cords, radios, portable computers, televisions, and others. A particular electromagnetic particular field distributes in any system described as electromagnetic radiation. Primarily, a particular electromagnetic particular field happens to be an section through spot who energy source hands throughout, that's involved with electrically imposed particles.
new england patriots jerseys
ReplyDeletechristian louboutin shoes
dansko outlet
new balance
louis vuitton handbags
beats headphones
nike air max uk
insanity max 30
new york knicks jersey
michael kors outlet
oklahoma city thunder jerseys
tods outlet
hollister clothing
lacoste shoes
burberry outlet online
tod's sale
tod's shoes
minnesota vikings jerseys
air jordan shoes
mont blanc outlet
vans shoes
washington redskins jerseys
calvin klein underwear
prada shoes
salomon speedcross 3
pandora jewelry
air jordan 13
louis vuitton
oakley sunglasses wholesale
toms shoes
hermes belt
cheap wedding dresses
ed hardy clothing
prada shoes
atlanta falcons jersey
kobe 9
ray-ban sunglasses
mont blanc
rolex watches
polo ralph lauren
0722maoqiuyun
san antonio spurs, http://www.sanantoniospursjersey.com/
ReplyDeletesalomon running shoes, http://www.salomonshoes.us.com/
golden state warriors, http://www.warriorsjersey.com/
ralph lauren,ralph lauren uk,ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,ralph lauren polo
minnesota vikings, http://www.minnesotavikingsjersey.us/
hermes bags, http://www.hermesbags.co.uk/
adidas outlet store, http://www.adidasoutletstore.us.com/
canada goose coats, http://www.uggbootscheap.eu.com/
michael kors outlet store, http://michaelkors.outletonlinestores.us.com/
nike air max,air max,air max 2014,nike air max 2014,air max 90,airmax,air max 95,air max 2013,nike air max 90,nike air max 2013
cheap mlb jerseys, http://www.cheapmlbjerseys.us.com/
cyber monday, http://www.blackfriday2015.in.net/
michael kors outlet,michael kors outlet online,michael kors,kors outlet,michael kors handbags,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
moncler jackets, http://www.uggoutletstore.eu.com/
soccer jerseys,soccer jerseys wholesale,soccer jerseys cheap,soccer jerseys for sale,cheap soccer jersey,usa soccer jersey,football jerseys
canada goose outlet, http://www.canada-goosejackets.us.com/
air jordan 4 retro, http://www.airjordan4.org/
ugg uk outlet, http://www.snowboots.us.com/
air jordan 11 retro, http://www.airjordan11.net/
kkkk1012
jianbin1208
ReplyDeletemichael kors uk outlet
fred perry shirts
lebron james shoes,lebron 12,lebron 12 shoes,lebron sneakers,lebron iv,lebron 11,lebron 10
nike air max 2014
timberland outlet
adidas jeremy scott
adidas outlet store
canada goose jackets
nike air huarache,nike huarache,nike huarache sneakers,nike huarache shoes
uggs outlet
north face jackets
football shirts uk,soccer jerseys uk,cheap soccer jerseys uk
coach outlet
winter coats outlet
ray ban sale
chanel handbags
michael kors usa
louis vuitton outlet online
lebron 12
michael kors outlet online
uggs outlet
ray ban sunglasses outlet,ray ban sunglasses,ray ban,rayban,ray bans,ray ban outlet,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban
canada goose jackets
cheap mlb jerseys
uggs outlet
cheap ugg boots
winter jackets outlet
los angeles clippers
dallas cowboys