windows phone 8 - SoundEffectInstance and progress bar -


in wp application i'm playing lengthy sound effect , trying update progressbar song state, can't find way, appreciated.

my sound standard soundeffectinstance sound;

and:

if (sound.state == soundstate.paused)                 {                     sound.resume();                 }                 else                 {                     try                     {                         sound.stop();                     }                     catch { }                     stream stream = titlecontainer.openstream("sounds.wav");                     var effect = soundeffect.fromstream(stream);                     sound = effect.createinstance();                     frameworkdispatcher.update();                     sound.play();                 } 

if have way length of sound, either in bytes or units of time, can use value. compare number of bytes streamed or amount of time elapsed (depending on can get) total, , set loading bar accordingly.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -