Search found 1973 matches

by angros47
Aug 05, 2022 17:51
Forum: General
Topic: Porting Some Old GW-BASIC Code to FreeBASIC, Hitting Weird Issues
Replies: 6
Views: 228

Re: Porting Some Old GW-BASIC Code to FreeBASIC, Hitting Weird Issues

@load81 You used "COLOR 15,1,4" (three parameters), while in FreeBasic it takes only 2 parameters. Replace it with "COLOR 15,1" The third parameter is the border color, that was used in GwBasic, and was ignored in QBasic. In FreeBasic it is not supported at all (nor it can be sup...
by angros47
Aug 05, 2022 17:22
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 87
Views: 27629

Re: Audio library for FreeBasic - Features

Yes, it actually is the solution. It was a mistake of mine: RiffLength, in fact, contains the size of the WAV file minus 8, so it needs to be fixed, and I forgot to add that when I wrote the function. In fact, the header is usually 44 bytes, and in the CreateWave function only 36 is added (because t...
by angros47
Aug 04, 2022 16:39
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 87
Views: 27629

Re: Audio library for FreeBasic - Features

Ok, found the cause of that clicking sound: Basically, since the memory is allocated, inside of the function CreateWave, with the command "allocate", it is not guaranteed to be all zero (that would mean silence), it contains random data. If you overwrite these data with the "sound&quo...
by angros47
Aug 03, 2022 22:26
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 87
Views: 27629

Re: Audio library for FreeBasic - Features

I cannot reproduce your issue: I tested your code, I hear no artifact. The issue you describe sounds like the header of the WAV file is created incorrectly. Are you sure you haven't accidentally modified the function CreateWave? It should be: #define FCC(c) *(cptr(Ulong Ptr,@##c)) function CreateWav...
by angros47
Jul 31, 2022 15:18
Forum: General
Topic: Converting to JS/Web Format
Replies: 4
Views: 222

Re: Converting to JS/Web Format

It is explained here: https://freebasic.net/forum/viewtopic.php?t=24021 and here: https://www.freebasic.net/forum/viewtopic.php?t=26956 Basically, you have to install and configure Emscripten, as explained here: https://emscripten.org/docs/getting_started/downloads.html then download the source of F...
by angros47
Jul 31, 2022 6:19
Forum: General
Topic: Converting to JS/Web Format
Replies: 4
Views: 222

Re: Converting to JS/Web Format

Yes, Emscripten is what you are looking for. FreeBasic can use it to compile directly to a web page (you would need the FreeBasic source to compile the runtime library with Emscripten before starting)
by angros47
Jul 27, 2022 13:22
Forum: General
Topic: What is the FreeBasic equivalent to "char" in C++?
Replies: 11
Views: 488

Re: What is the FreeBasic equivalent to "char" in C++?

@coderJeff
This is a great news!
Out of curiosity, does your adding allows also to fix the mangling in nested types? ( viewtopic.php?t=29524)
by angros47
Jul 26, 2022 7:30
Forum: General
Topic: What is the FreeBasic equivalent to "char" in C++?
Replies: 11
Views: 488

Re: What is the FreeBasic equivalent to "char" in C++?

No. I am talking about C++, not C If in C++ I have: void foo(char a) And in FreeBasic I declare: extern "c++" Declare sub foo (a as byte) end extern It will look for the C++ function void foo(signed char a) And that will return an error (in C the two declarations are equivalent, in C++ the...
by angros47
Jul 25, 2022 23:57
Forum: General
Topic: What is the FreeBasic equivalent to "char" in C++?
Replies: 11
Views: 488

What is the FreeBasic equivalent to "char" in C++?

Declaring a procedure using extern "c++", the type "byte" is converted to "signed char", while the type "ubyte" is converted to "unsigned char". What if the C++ function used just "char", without specifying? In a C declaration this is not a...
by angros47
Jul 24, 2022 23:28
Forum: General
Topic: [Solved] FBTemp Crashing when trying to access Database
Replies: 13
Views: 420

Re: FBTemp Crashing when trying to access Database

' © 2014 - 2022, algPoS, Northampton ' Coded by : Andrew Gable ' Desgined by : Andrew Gable ' Software owned by : Andrew Gable and algPoS, Northampton ' This version USES THE MySQL interface to a local Database that is Kept in sync with the back office via DataSync Program ' This is currently writt...
by angros47
Jul 24, 2022 21:59
Forum: General
Topic: [Solved] FBTemp Crashing when trying to access Database
Replies: 13
Views: 420

Re: FBTemp Crashing when trying to access Database

Without the source code, we cannot replicate the issue, so we can't answer. Why don't you place some PRINT instructions in your application, at each step of initialization, so you can see how long it goes before crashing (and locate the instruction that causes the issue)?
by angros47
Jul 24, 2022 11:51
Forum: Beginners
Topic: Pointer in FB
Replies: 6
Views: 324

Re: Pointer in FB

Just a newbie to FB,and curious can pointer in FB do everything that c does? Basically, yes, because they work in the same way. The main difference with C is about arrays pointers (since in FreeBasic they point to the descriptor, not to the actual data) and string pointers (since strings are manage...
by angros47
Jul 20, 2022 18:57
Forum: Libraries & Headers
Topic: QB, PLAY statement and library
Replies: 22
Views: 761

Re: QB, PLAY statement and library

I am glad you find it useful
by angros47
Jul 20, 2022 18:31
Forum: Libraries & Headers
Topic: QB, PLAY statement and library
Replies: 22
Views: 761

Re: QB, PLAY statement and library

As you said, "in your opinion" ;-)

What would you want to be able to do, with that library, that the lgpl license prevent you from doing, while the mit license would allow it?
by angros47
Jul 20, 2022 16:59
Forum: Libraries & Headers
Topic: QB, PLAY statement and library
Replies: 22
Views: 761

Re: QB, PLAY statement and library

Also, why would a mit license be better? I remind you that both the freebasic runtime and the graphic libraries are under LGPL already, so anyone who had issues with those licenses would not use FreeBasic not the sfx library anyway