Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
RiritoNinigaya authored Apr 24, 2024
1 parent e587471 commit d608f20
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions BASSdotNetExample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -7,6 +7,8 @@
using System.Threading;
using System.Threading.Tasks;
using BASSdotNET;
using AnyConsole;
using System.Drawing;

namespace BASSdotNetExample
{
Expand All @@ -32,6 +34,22 @@ public static string Utf16ToUtf8(string utf16String)
}
static void Main(string[] args)
{
var console = new ExtendedConsole();
console.Configure(config =>
{
config.SetStaticRow("Header", RowLocation.Top, Color.White, Color.DarkRed);
config.SetStaticRow("SubHeader", RowLocation.Top, 1, Color.White, Color.FromArgb(30, 30, 30));
config.SetStaticRow("Footer", RowLocation.Bottom, Color.White, Color.DarkBlue);
config.SetLogHistoryContainer(RowLocation.Top, 2);
config.SetUpdateInterval(TimeSpan.FromMilliseconds(100));
config.SetMaxHistoryLines(1000);
config.SetQuitHandler((consoleInstance) => {
Console.Write("Quiting...");
Environment.Exit(3021);
});
});
console.Start();
console.Title = "BASS.NET Example Console Edition by RiritoNinigaya";
Console.WriteLine("Hello World from BASS.NET Library!!!");
BASS bass = new BASS();
if(bass.Init_Bass(-1, 48000, 0, 0, 0))
Expand All @@ -46,12 +64,8 @@ static void Main(string[] args)
Console.WriteLine("BASS.DLL IS FAILED TO CREATING FILE STREAM!!!");
Environment.Exit(323);
}
//Console.WriteLine(str); //This is Not Necessary, if you cannot Initializating WAV Sound or MP3 Sound
bass.ChannelPlay(str, false);
while(true)
{
Thread.Sleep(4000);
}
console.WaitForClose();
}
}
}
Expand Down

0 comments on commit d608f20

Please sign in to comment.