Phoenix Edition v3.1 released! - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16) +--- Forum: Announcements (https://staging.qb64phoenix.com/forumdisplay.php?fid=18) +--- Thread: Phoenix Edition v3.1 released! (/showthread.php?tid=849) |
RE: Phoenix Edition v3.1 released! - Gets - 09-05-2022 I'm still using version 1.5 because I didn't want to rewrite all of my functions, but the audio backend being replaced is reason enough to finally upgrade. I've only ran one test and it's finishing in 1/3 of the time it took on 1.5, so I'm happy with the performance so far. RE: Phoenix Edition v3.1 released! - OldMoses - 09-05-2022 (09-04-2022, 06:59 PM)bplus Wrote:(09-04-2022, 05:53 PM)OldMoses Wrote:(09-04-2022, 04:59 PM)bplus Wrote: Wow nice list of improvements. What is difference between shift left / right and rotate left /right? I can recall, from back in the days when I attempted to fool with Assembly, that most CPU's had ROL & ROR in their instruction set. Also known as 'circular shifting' or 'rotate no carry'. However, I can't recall ever using it. The mathematics of doing it is pretty squirrely, and I can't for the life of me think of a mathematical application. I can't find much on the net about it, other than what it is. I found a mention on wikipedia that it is used frequently in cryptography. Not surprising given the arcane nature of that pursuit. I can imagine a simple encryption scheme of using a key array to rotate character bytes in certain order, to scramble them up and then reversing the order to unscramble them, but I'm sure its use is far more sophisticated than my kindergarden encryption ideas. A lot of languages don't have native support for circular shifting, requiring the writing of appropriate functions, so now QB64PE has something to distinguish it from the rest of the rabble. Perhaps someone can discuss why it was added. You can rotate 0 & -1 in either direction until the cows fly in to roost and they will remain 0 & -1, respectively. It will act very much like _SHL & _SHR until a set bit crosses the MSB/LSB boundary and signs will flip (unless you're working with unsigned variables) and all sorts of weird fun commences. RE: Phoenix Edition v3.1 released! - SMcNeill - 09-05-2022 @OldMoses The math isn't as complex as you think. Let's take 10000001 as an example. To rotate left once: Shift the bits left once, store the result: 00000010 Take the original, shift the bits right 7 times, store the result: 00000001 OR those results: 00000010 00000001 (OR) ========== 00000011 And that's the general idea behind it. I've personally never needed it either, but other folks did and they requested it from us. Since it was easy enough to implement (as illustrated in the example above), we went ahead and added it into the language for everyone to be able to use and enjoy. Now, let's hope somebody out there can show us some amazing uses for it! RE: Phoenix Edition v3.1 released! - Coolman - 09-05-2022 (09-05-2022, 12:19 AM)Stuart Wrote:(09-04-2022, 06:28 PM)Coolman Wrote: miniaudio seems to be statically linked to the executable. i tested with a code. the size of the program generated by version 3.0.0 is about 2,8 mo while the one generated by version 3.1.0 is about 3.1 mo. that said the executable won't have any dependency on it. that's good. thank you for integrating the -no-pie option. the other additions and modifications seem interesting. great job. hi @Stuart. i didn't feel any slowdown in version 3.1.0 of qb64 for the sound but i didn't do a thorough test. that said qb64 has been fully compiled with the -O3 option by modifying the makefile. it would be necessary to do other tests because a difference of 5% is too important and may impact many programs... RE: Phoenix Edition v3.1 released! - Circlotron - 09-05-2022 (09-05-2022, 01:32 AM)OldMoses Wrote: I can recall, from back in the days when I attempted to fool with Assembly, that most CPU's had ROL & ROR in their instruction set. Also known as 'circular shifting' or 'rotate no carry'. However, I can't recall ever using it. The mathematics of doing it is pretty squirrely, and I can't for the life of me think of a mathematical application.Rotates are used in combination with shifts when you want to shift say a 16 bit number that is contained in two bytes. Shift left the LS byte and the left most bit get pushed out into the carry bit. Then rotate left the MS byte and that pulls the carry bit into the right most position of the MS byte. The left most bit of the MS byte is pushed out into the carry bit. So basically shift doesn't pull the (possibly unknown) carry bit into the byte. Dunno how the carry bit is with BASIC, but that's how it generally works with micros using assembly anyway. RE: Phoenix Edition v3.1 released! - Coolman - 09-05-2022 I made a test with the code of SierraKen below which reads an mp3 audio file with animation. the quality of the sound is better with the version 3.0.0 of qb64. to note that the animation disappears with the version 3.1.0... Code: (Select All) 'Tesla Coil by SierraKen - September 1, 2022. RE: Phoenix Edition v3.1 released! - Ikerkaz - 09-05-2022 Hi, I am compiling a program and Windows Security is detecting that my program is a virus ?????? Trojan:Win32/Wacatac.H!ml I am developing a game, and it worked fine in old QB64. Yesterday I downloaded v3.1 and I have changed several things (nothing important), and since 10 minutes the virus alert is rising Do you have any idea of what is happening? Thank you!!! IKZ RE: Phoenix Edition v3.1 released! - OldMoses - 09-05-2022 (09-05-2022, 02:02 PM)Coolman Wrote: I made a test with the code of SierraKen below which reads an mp3 audio file with animation. the quality of the sound is better with the version 3.0.0 of qb64. to note that the animation disappears with the version 3.1.0... I got the same result. Plays the sound but not the animation. RE: Phoenix Edition v3.1 released! - SMcNeill - 09-05-2022 (09-05-2022, 02:02 PM)Coolman Wrote: I made a test with the code of SierraKen below which reads an mp3 audio file with animation. the quality of the sound is better with the version 3.0.0 of qb64. to note that the animation disappears with the version 3.1.0... The problem here is two-fold. First, there's a glitch in the old OpenAL backend which always reports your audio as being TYPE 0, so it's *always* handled by the segment reading' integer mono (QB64 OpenAL stuff). The new backend fixes that problem, and we now get stereo sound out of our speakers! YAY!! Which leads to the second issue -- a minor glitch in the original code: Take a close look and look at these lines: Code: (Select All) If (sz = 4 Or sz = 2) And SampleData.TYPE = 1 Then ' integer stereo or mono Mem.TYPEs aren't one value; they're a collection of bits which make up that value. 1, 2, 4,8, 16, 32 <-- these values are the size of your data type. 128 <-- this value says that your data type is an integer. For a _BYTE, it has a value of 129. (size 1 flag for byte + 128 integer flag) For a _LONG, it has a value of 132. (size 4 flag for long + 128 integer flag) These values aren't = 1 or = 4. You check to see if they AND 128 (integer) or AND 256 (float).... Code: (Select All) If (sz = 4 Or sz = 2) And (SampleData.TYPE AND 128) Then ' integer stereo or mono Make the changes above so that you're ANDing the type, rather than EQUALing the type, and it plays just fine. The problem here wasn't QB64 -- it was a minor glitch in the code which wasn't found because the previous version of QB64 was glitched and never triggered this issue in the past so it wasn't found and debugged. RE: Phoenix Edition v3.1 released! - a740g - 09-05-2022 [attachment=824 Wrote:Coolman pid='6295' dateline='1662386558']I made a test with the code of SierraKen below which reads an mp3 audio file with animation. the quality of the sound is better with the version 3.0.0 of qb64. to note that the animation disappears with the version 3.1.0... I made the changes in the download. Also see Example 1 and 2 in _MEMSOUND - QB64 Phoenix Edition Wiki |