Exemplo n.º 1
0
        static void playlistTest()
        {
            var w    = new Audio.Walkman();
            var play = w.createPlaylist("s.mp3", "s.flac", "t.mp3", "r.mp3");

            w.tagMaster.add(new Audio.Music("s.mp3"), "mp3");
            w.tagMaster.add(new Audio.Music("t.mp3"), "mp3");
            w.tagMaster.add(new Audio.Music("r.mp3"), "mp3");

            var mp3 = w.Query(play, new Audio.Tag("mp3"));

            Script script = new Script();


            string test = @"
function test(x)
	return x * x
end

return test";

            var t   = script.DoString(test);
            var fun = t.Function;

            Console.WriteLine(fun.GetType());
            var res = fun.Call(2);

            Console.WriteLine(res.CastToNumber());

            Console.WriteLine(mp3);
            Console.ReadKey();
        }
Exemplo n.º 2
0
            public GUI() : base("yo")
            {
                //GLib.Timeout.Add(5, GlobalKeyChecker);
                Destroyed     += quit;
                KeyPressEvent += OpenConsole;

                player = new Audio.Walkman();
                player.Volume(0.3);
                consoleHide = false;
                console     = new AConsole(player);
                menu        = new Menu(player);


                label = new Label("shit");
                box   = new VBox();
                music = new PlaylistViewContainer(player);

                //box.Add(menu);
                //box.Add(music);
                //box.Add(console);
                var menutest = new MenuBar();

                menutest.Add(new Label("test"));
                menutest.Style = menu.Style;
                //menutest.HeightRequest = 30;
                //box.PackStart(menutest, false, false, 0);
                menu.HeightRequest = 30;

                var hboxtest = new HBox();

                hboxtest.HeightRequest = 30;
                box.PackStart(menu, false, false, 0);
                box.PackStart(music, true, true, 0);
                box.PackStart(console, false, false, 0);
                this.SetDefaultSize(1280, 720);

                var p = player.createPlaylist("Play1", "s.flac", "s.mp3", "reaper.flac", "t.mp3");

                player.createPlaylist("Test", "r.mp3", "reaper.flac");
                player.setPlaylist(p);
                Add(box);
            }
Exemplo n.º 3
0
 public DynValue createPlaylist(string name, params string[] path)
 {
     return(UserData.Create(play.createPlaylist(name, path)));
 }