public static bool Init() { #region dumb obfuscation for email and registration key, just to prevent bots. byte obfu = 0xDA; byte[] eml = new byte[] { 0xBE, 0xBB, 0xB4, 0xBF, 0x9A, 0xA2, 0xBB, 0xA3, 0xA8, 0xF4, 0xBD, 0xBB, }; byte[] rkey = new byte[] { 0xE8, 0x82, 0xE3, 0xE9, 0xE8, 0xE9, 0xEB, 0xE8, 0xEE, 0xE9, 0xE9, }; for (int i = 0; i < eml.Length; i++) { eml[i] ^= (obfu); } for (int i = 0; i < rkey.Length; i++) { rkey[i] ^= (obfu); } #endregion Un4seen.Bass.BassNet.Registration(Encoding.ASCII.GetString(eml), Encoding.ASCII.GetString(rkey)); Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); // Initialize audio engine BassFx.LoadMe(); BASS_DEVICEINFO info = new BASS_DEVICEINFO(); // Print device info. for (int n = 0; Bass.BASS_GetDeviceInfo(n, info); n++) { //Console.WriteLine(info.ToString()); } globalLoopProc = new SYNCPROC(DoLoop); return(true); }
public static void PrepareLibraries() { bool suc = false; if (IntPtr.Size == 8) { suc = Bass.LoadMe(Application.StartupPath + @"\lib64"); if (suc) { suc = BassFx.LoadMe(Application.StartupPath + @"\lib64"); } } else { suc = Bass.LoadMe(Application.StartupPath + @"\lib32"); if (suc) { suc = BassFx.LoadMe(Application.StartupPath + @"\lib32"); } } if (!suc) { MessageBox.Show("Możliwe, że biblioteka nie znajduje się już w poprzedniej lokalizacji. Jeśli program był przenoszony, należy się upewnić czy wraz z nim przeniesiono pozostałe foldery aplikacji. W razie problemów zaleca się ponowne pobranie programu.", "Nie udało się załadować biblioteki Bass.", 0, MessageBoxIcon.Error); Environment.Exit(1); } }
static BeatDetector() { byte[] hex = { 0x74, 0x68, 0x69, 0x6A, 0x73, 0x40, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x77, 0x69, 0x72, 0x65, 0x2E, 0x6E, 0x65, 0x74, 0x2D, 0x32, 0x58, 0x31, 0x38, 0x33, 0x31, 0x32, 0x38, 0x32, 0x30, 0x31, 0x31, 0x33, 0x37, 0x31, 0x38 }; string[] str = ASCIIEncoding.ASCII.GetString(hex).Split('-'); BassNet.Registration(str[0], str[1]); Bass.LoadMe(); BassWasapi.LoadMe(); BassFx.LoadMe(); }
public static void initBass() { if (!Init) { //obfuscate this BassNet.Registration("*****@*****.**", "2X18221315153720"); Init = true; Bass.BASS_Init(-1, Frequency, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); BassFx.LoadMe(); } }
private void LoadBassLibraries(string targetPath) { if (!Bass.LoadMe(targetPath)) { throw new BassException("Could not load bass native libraries from the following path: " + targetPath); } if (!BassMix.LoadMe(targetPath)) { throw new BassException("Could not load bassmix library from the following path: " + targetPath); } if (!BassFx.LoadMe(targetPath)) { throw new BassException("Could not load bassfx library from the following path: " + targetPath); } DummyCallToLoadBassLibraries(); }
public static void Init() { #region dumb obfuscation for email and registration key, just to prevent bots. byte obfu = 0xDA; byte[] eml = new byte[] { 0xBE, 0xBB, 0xB4, 0xBF, 0x9A, 0xA2, 0xBB, 0xA3, 0xA8, 0xF4, 0xBD, 0xBB, }; byte[] rkey = new byte[] { 0xE8, 0x82, 0xE3, 0xE9, 0xE8, 0xE9, 0xEB, 0xE8, 0xEE, 0xE9, 0xE9, }; for (int i = 0; i < eml.Length; i++) { eml[i] ^= (obfu); } for (int i = 0; i < rkey.Length; i++) { rkey[i] ^= (obfu); } #endregion Un4seen.Bass.BassNet.Registration(Encoding.ASCII.GetString(eml), Encoding.ASCII.GetString(rkey)); // Registration code, feel free to email me. // Note that because of this, JaiSeqX cannot be used for commercial purposes. Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); // Initialize audio engine BassFx.LoadMe(); // Load the effects library globalLoopProc = new SYNCPROC(DoLoop); // Create our loop proc to bind audio objects to, global and static so it doesn't get collected. g_FadeFreeProc = new SYNCPROC(FadeCollect); BASS_DEVICEINFO info = new BASS_DEVICEINFO(); // Print device info. for (int n = 0; Bass.BASS_GetDeviceInfo(n, info); n++) { Console.WriteLine(info.ToString()); } }
public bool BassFxLoadMe(string targetPath) { return(BassFx.LoadMe(targetPath)); }
//add bookmode to listview, show one entry per books(albums), playing a different book will start from your last position in that book - so you can play other files/books and come back //playing a file directly always plays from the start assuming its not loaded/prescrubbed //make it a whole other mode, book scrubber by default (also make book scrubber only for current book not for entire library) //should be default mode actually, leave multifiles and junk to the program to handle //controls should affect book mode when in book mode (prev/next book instead of file) public Form1() { InitializeComponent(); chkArtPlaying.Parent = pBoxArt; scrubber.Scrubbed += Scrubber1_Scrubbed; fileList.OrderChanged += fileList_OrderChanged; AudioPlayer.AudioPlaying += AudioPlayer_AudioPlaying; AudioPlayer.AudioCompleted += AudioPlayer_AudioCompleted; try { BassNet.Registration("*****@*****.**", "2X3729121152222"); Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); //Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_FLOATDSP, true); Dictionary <int, string> loadedPlugIns = Bass.BASS_PluginLoadDirectory(System.IO.Directory.GetCurrentDirectory()); BassFx.LoadMe(); BassMix.LoadMe(); } catch (Exception e) { BASSError er = Bass.BASS_ErrorGetCode(); } string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ABPlayer"); if (Directory.Exists(folder)) { string file = Path.Combine(folder, "lastOpen.txt"); if (File.Exists(file)) { using (FileStream fs = new FileStream(file, FileMode.Open)) using (StreamReader sr = new StreamReader(fs)) { int index = Convert.ToInt32(sr.ReadLine()); long ticks = Convert.ToInt64(sr.ReadLine()); List <string> files = new List <string>(); string f = ""; while ((f = sr.ReadLine()) != null) { files.Add(f); } AddFiles(files.ToArray()); if (files.Count > 0) { playingId = index; playing = audioFiles[index]; PlayFile(index, new TimeSpan(ticks) - audioFiles[index].StartTime, true); } } } file = Path.Combine(folder, "settings.txt"); if (File.Exists(file)) { using (FileStream fs = new FileStream(file, FileMode.Open)) using (StreamReader sr = new StreamReader(fs)) { AudioPlayer.Volume = Convert.ToSingle(sr.ReadLine()); UpdateMono(Convert.ToBoolean(sr.ReadLine())); AudioPlayer.Speed = Convert.ToSingle(sr.ReadLine()); } } tBarVol.Value = (int)(AudioPlayer.Volume * 100); lblVol.Text = tBarVol.Value + "%"; speedToolStripMenuItem.Text = "Speed (" + AudioPlayer.Speed + ")"; } }