c# - Play Sound in MonoTouch for specific duration -


using monotouch libraries, being able play sound specific duration , stop playback. must done on different thread ui. i've tinkered few different options, , i'm not entirely sure best course of action @ point.

the classes this:

public class foo {     public string filename { get; set; }     public string filepath { get; set; }     public double duration { get; set; }     public double pauseafter { get; set; } }  public class fooplayer {     public list<foo> foos { get; set; }      public void playfoos()     {         foreach (foo f in foos)         {              //play sound              //stop sound after duration has passed              //wait duration specified in pauseafter              //continue loop         }     } }    

i've been tinkering systemsound , avaudioplayer i'm yet required result.

use timer, , after timer fires stop playback. similar question here, similar answer (use timer) in obj-c.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -