Wednesday, 15 July 2015

c# - BackgroundAudioPlayer doesn't start playing -



c# - BackgroundAudioPlayer doesn't start playing -

windows phone 8 app. we're using audiostreamingagent/mp3mediastreamsource play mp3 files cached locally or loaded web.

when file downloaded still using audiostreamingagent /mp3mediastreamsource ensure able precache next file while playing current. yes, utilize wp8 built-in player cached files, not able precache next file in case.

problem: after several tracks, backgroundaudioplayer doesn't start playing anymore.

audiostreamingagent.onbeginstreaming executed Сode create mediastreamsource executed audiostreamer.setsource method executed new mediastreamsource instance playstatechanged fired in background process playstate.trackready , player.play() called in case.

after all, see track shown in uvc, it's in state "paused". pressing "play" in uvc calls onuseraction in background calls player.play(). nil changes.

picture of "stuck state"

sample problem reproduction, vs 2012 (sample based on background sound streamer sample)

steps reproduce sample code:

install app press button "preload tracks". copies mp3 files xap isolatedstorage. press "track 1" button. after track starts playing, press button "track 2". then, after track 2 starts playing, press button "track 3". keep doing step 3 until after pressing "track *" button track doesn't start playing. last track selected shown active track both in uvc , above progress bar on page (see picture) pressing other track buttons in cases doesn't create difference.

the problem reproduced both on device , on emulator, both on wp8 , wp8.1 developer preview.

update: running out of memory not case. reproducing problem using sample code , looking @ backgroundlog.xml file shows sample uses 6 mb out of 20 mb allowed lastly column on image "memory usage|max allowed memory usage"

in experience this, suggestion port , start working wpa8.1 limitations playing background sound go away.

in developing music player app wp , trying cache music while using mediastreamsource, came conclusion might not possible. seems have set amount of time or other variable before os stomps on tasks or background type work beingness done.

i wrote ms evangelist: https://drive.google.com/file/d/0by_e5c-qwr9ka3rmbvblwvf3r1e/edit?usp=sharing

here other so's favored when trying solve this:

backgroundaudioplayer 'playing' not calling getsampleasync()

wp7 background sound resources no longer available

httpwebrequest audioplayeragent

audioplayeragent, timer , webservice

wp7 mp3mediastreamsource demo not working

c# windows-phone-8 audio-streaming background-audio mediastreamsource

No comments:

Post a Comment