Esempio n. 1
0
        public static void Main()
        {
            NetCoreAudio.Player WWTheme = new NetCoreAudio.Player();
            WWTheme.Play("WW_Background.wav");



            Management.Title();

            Game.startGame();

            string name = Game.PlayerName();

            Whale Player = Game.nameCharacter(name);

            Game.Choice(Player);

            Game.preBlowholiaDialog(Player);

            Game.BlowholiaDialog(Player);

            Game.postBlowholiaDialog(Player);

            ConsoleInterface.Goose1(Player);

            ConsoleInterface.Shop1(Player);

            ConsoleInterface.Ship1(Player);

            Game.AtlantisDialog(Player);

            Game.postAtlantisDialog(Player);

            ConsoleInterface.Ship2(Player);

            Game.CoraltonDialog(Player);

            Game.postCoraltonDialog(Player);

            ConsoleInterface.Ship3(Player);

            Game.BlubbernotDialog(Player);

            Game.postBlubbernotDialog(Player);

            ConsoleInterface.Ship4(Player);

            Game.trenchDialog(Player);

            Game.PreTrenchChoice(Player);

            Game.trenchDialog1(Player);

            Game.posttrenchDialog(Player);
        }
Esempio n. 2
0
        public static async Task Main(string[] args)
        {
            var client = new AmazonS3Client(RegionEndpoint.EUWest2);
            ListBucketsResponse buckets_response = await client.ListBucketsAsync();

            foreach (var bucket in buckets_response.Buckets)
            {
                ListObjectsV2Request req = new ListObjectsV2Request();
                req.BucketName = bucket.BucketName;
                // NOTE if this finds a folder it includes the folder as an object, and its content as
                // more objects.  I thought folders didn't exist as such, but it seems they do.
                ListObjectsV2Response res = await client.ListObjectsV2Async(req);

                int len = res.S3Objects.Count;
                Console.WriteLine(bucket.BucketName + " date:" + bucket.CreationDate + " has " + len + " objects.");
                if (len > 0)
                {
                    foreach (var obj in res.S3Objects)
                    {
                        Console.WriteLine("   " + obj.Key + " " + obj.Size + " " + obj.StorageClass + " " + obj.ETag);
                    }
                }
            }

            var pollyclient = new AmazonPollyClient();
            SynthesizeSpeechRequest request = new SynthesizeSpeechRequest();

            request.Text         = "Hello my lovely little world.";
            request.OutputFormat = OutputFormat.Mp3;
            request.VoiceId      = VoiceId.Emma;
            var pollyres = await pollyclient.SynthesizeSpeechAsync(request);

            var fs    = new FileStream("c:/tmp/hw.mp3", FileMode.Create);
            var instr = pollyres.AudioStream;

            byte[] bytes = new byte[256];
            int    count = 0;

            while (true) //count < instr.Length)
            {
                int c = instr.Read(bytes, 0, 256);
                if (c == 0)
                {
                    break;
                }
                fs.Write(bytes, 0, c);
                count += c;
            }
            fs.Close();
            var okater = new NetCoreAudio.Player();

            okater.Play("c:/tmp/hw.mp3").Wait();
            Console.WriteLine("Thanks for all the fish");
            Console.ReadLine();
        }
Esempio n. 3
0
 public CorePlayerEngine()
 {
     player = new NetCoreAudio.Player();
     player.PlaybackFinished += (sender, args) => SignalFinished();
 }
Esempio n. 4
0
 public override void Dispose()
 {
     player = null;
 }