aboutsummaryrefslogtreecommitdiff
path: root/Sirop.Backend
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-02-08 21:27:18 -0500
committerAndrew Lee <alee14498@protonmail.com>2021-02-08 21:27:18 -0500
commite81e3817c0a4b735da47e6c45529c6f88ed4d52f (patch)
treed787a2503a6d4d3c19f9a3c6bced71c61035842a /Sirop.Backend
parentf5a7e3ef7e25aa2545f541e171f2d5f6fe43ecc7 (diff)
downloaderable-godot-e81e3817c0a4b735da47e6c45529c6f88ed4d52f.tar.gz
erable-godot-e81e3817c0a4b735da47e6c45529c6f88ed4d52f.tar.bz2
erable-godot-e81e3817c0a4b735da47e6c45529c6f88ed4d52f.zip
Moved playback to backend; Menu; Size now matches
Diffstat (limited to 'Sirop.Backend')
-rw-r--r--Sirop.Backend/Playback.cs30
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