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
Post a Comment