diff options
Diffstat (limited to 'Sirop.Backend')
| -rw-r--r-- | Sirop.Backend/Playback.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Sirop.Backend/Playback.cs b/Sirop.Backend/Playback.cs new file mode 100644 index 0000000..a073ce3 --- /dev/null +++ b/Sirop.Backend/Playback.cs @@ -0,0 +1,30 @@ +using Gst; + +namespace Sirop.Backend.Audio +{ + public static class Playback + { + public static void PlayAudio() + { + Application.Init(); + // Build the pipeline + var pipeline = Parse.Launch("playbin uri=file:///home/andrew/Music/4616-werq-by-kevin-macleod.mp3"); + + // Start playing + pipeline.SetState(State.Playing); + + // Wait until error or EOS + var bus = pipeline.Bus; + var msg = bus.TimedPopFiltered (Constants.CLOCK_TIME_NONE, MessageType.Eos | MessageType.Error); + + // Free resources + pipeline.SetState (State.Null); + + } + + public static void StopAudio() + { + + } + } +}
\ No newline at end of file |
