1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-09 23:35:13 +00:00
Commit graph

3036 commits

Author SHA1 Message Date
Samuel Gomes 061bf6af3d Rename _NEWSOUND to _SNDNEW to align with _SND* APIs 2022-12-31 12:00:38 +05:30
Samuel Gomes 1179d3c084 Update sndopen_mem_test to not use any file I/O 2022-12-31 07:47:20 +05:30
Samuel Gomes b2723cf057 Fix path for file in test for *nix 2022-12-31 05:40:39 +05:30
Samuel Gomes da9d9e871c Fix for template argument deduction/substitution failed 2022-12-31 05:18:22 +05:30
Samuel Gomes 31257262a8 Add tests for _NEWSOUND and _SNDOPEN 2022-12-31 04:22:42 +05:30
Samuel Gomes 4c80f6bcea Implement feature request #28 2022-12-31 01:49:23 +05:30
Samuel Gomes eebb56afd5 Implement load sound from memory #232 2022-12-22 20:42:27 +05:30
Samuel Gomes a72f80258f Address #186 2022-12-22 15:11:20 +05:30
Samuel Gomes bc65076feb Reduce mutex locks by using 2 vectors for _SNDRAW 2022-12-21 11:47:41 +05:30
Samuel Gomes b187102668
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-12-21 04:22:23 +05:30
github-actions[bot] 55b168db6c Automatic update of ./internal/source 2022-12-20 13:31:46 +00:00
Roland Heyder 054d437cc4
Merge pull request #276 from QB64-Phoenix-Edition/tiny-things
Tiny things
2022-12-20 14:12:21 +01:00
Roland Heyder 2324a88ff8 Update README.md
- add some general information
2022-12-20 12:01:23 +01:00
Roland Heyder 764996499c nm output buffering
- file is loaded on first access and then kept in buffer
2022-12-20 02:59:52 +01:00
Roland Heyder d31f668c0c Distribution
- remove .gitignore file from source folder in distribution archives
2022-12-20 01:31:44 +01:00
Roland Heyder d243ff4b74 Wiki changes
- allow word wrap in text blocks
- add <pre> block handling
2022-12-20 01:18:56 +01:00
Matt Kilgore 6d2197c384
Merge pull request #272 from mkilgore/add-curl-setup-lnx
Add curl and remove xmessage from setup_lnx.sh
2022-12-19 16:02:42 -05:00
Matthew Kilgore 9eed3af108 Remove xmessage as a required package on Linux
xmessage is no longer a required dependency due to the addition of
tinyfiledialogs. xmessage is an option, but there are both better
alternatives on Linux and backup options if xmessage and friends cannot
be found so it is not required.
2022-12-19 15:11:34 -05:00
Matthew Kilgore 680c65fe0b Add curl to package lists
libcurl is now a dependency, so the curl package needs to be installed
on Linux (very likely to already be there) along with the development
files (some distros have separate 'devel' packages).

Fixes: #265
2022-12-19 15:11:34 -05:00
github-actions[bot] 0c28341eb9 Automatic update of ./internal/source 2022-12-19 15:39:35 +00:00
Matt Kilgore 78b09c1ea2
Merge pull request #275 from flukiluke/main
Reduce the number of times nm is invoked
2022-12-19 10:17:05 -05:00
Luke Ceddia 4086cda00d
Clean up nm commands 2022-12-19 22:36:58 +11:00
Luke Ceddia ed0b6b12a5 Use tmpdir$ instead of internal/temp/ when invoking nm 2022-12-18 21:45:06 +11:00
Luke Ceddia ab0c2b189d Only run nm once per library 2022-12-18 20:45:58 +11:00
Samuel Gomes 1357f53041 Add NO_PITCH, NO_SPATIALIZATION flags for raw ma_sound 2022-12-16 12:28:22 +05:30
Samuel Gomes bcc7105641 Avoid getting queue size inside loop 2022-12-16 03:50:32 +05:30
Samuel Gomes bd82b24ac7 Improve SOUND timing - #167 2022-12-15 10:47:27 +05:30
Samuel Gomes df9b739e23 Address #166 - _SNDRAW using miniaudio data source 2022-12-15 09:16:42 +05:30
Samuel Gomes cf16cb0c00 Replace custom queue code with C++ STL queue 2022-12-13 09:12:52 +05:30
Samuel Gomes 7f2ab7e83a
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-12-04 01:32:39 +05:30
github-actions[bot] 6aea9b3a65 Automatic update of ./internal/source 2022-12-03 17:00:49 +00:00
Matt Kilgore acf918bafd
Merge pull request #270 from mkilgore/glut-fix
Only call GLUT functions from the GLUT thread.
2022-12-03 11:41:15 -05:00
Matthew Kilgore 7ac2eefcb8 Fix slowdown of _ScreenX and _ScreenY
The commands _ScreenX and _ScreenY got significantly slower due to the
need to wait for the GLUT thread to wake up and execute the glutGet()
command for them. We've already seen a few programs (including the IDE)
where this behavior completely grinds the program to a halt, so we
definitely can't keep it.

The simple solution here is to not call glutGet() on every _ScreenX/Y
command. Instead every time the idle/timer function runs we get the
current values for the relevant glutGet() variables and store them.
libqb_glut_get() then checks if the value being read is one of the ones
we read in the idle/timer functionand if so just returns the last read
value. By doing it this way the commands no longer has to wait on the
GLUT thread for the result.
2022-11-30 17:33:17 -05:00
Matthew Kilgore f7fabda198 Fix random seg faults on exit
Fairly straightfowrad, programs were randomly seg faulting on exit. This
was happening due to GLUT registering a cleanup function via atexit(),
which then gets called when exit() is called.

The issue happens when exit() is called on a thread other than the GLUT
thread, which leads to the exit() call then attempting to cleanup GLUT
while the other thread is still using it, which randomly leads to seg
faults.

Fixing this is slightly annoying. We cannot stop the GLUT thread, as
the basic GLUT API (which is used on Mac OS) simply does not offer a way
to exit the glutMainLoop() call. Thus the simplest solution is to simply
make sure we call exit() on the GLUT thread, which we can fairly easily
due via the message queue.

That being the case, a new libqb_exit() API was added, which simply
regsiters the GLUT exit message and then waits for the program to end.
The atexit() handler then runs on the GLUT thread and everything works
out fine.

In the future we probably should redo the exit logic a bit so that all
the threads are actually stopped/joined to ensure the exit process is
consistent, however this is good enough for now. Also, there's plenty of
error states which call exit() which I did not address.
2022-11-29 20:04:54 -05:00
Matthew Kilgore 6c288ecb6f Don't compile libqb.cpp as Objective-C on Mac OS
With the recent changes to libqb.cpp to pull out some of the GLUT logic,
the only actual Objective-C in libqb.cpp was pulled out. That being the
case, it's no longer necessary to have libqb.mm for compiling libqb.cpp,
so we're removing it to simplify the compliation logic a bit.
2022-11-29 20:04:54 -05:00
Matthew Kilgore 72193e34e5 Add GLUT command queue, processed on GLUT thread
This fixes all the code so that all the calls to glut functions
happen on the same thread that is running GLUT.

We achieve this by creating a queue of GLUT commands to execute.
Commands can be added to the queue anywhere in the code, and then the
queue is processed on the GLUT thread via it's idle func or timer func.
The command is run and if necessary the result is provided in the
message queue object. Each object contains a completion which can be
waited on to block until the GLUT thread has processed the command.

Fixes: #66
2022-11-29 20:04:54 -05:00
Matthew Kilgore d678be717c Move GLUT initialization logic into separate .cpp file 2022-11-29 20:04:53 -05:00
Matthew Kilgore 3e03cef652 Install Xvfb on Linux build agent
Xvfb is being used to give us an X server implementation on the Linux
build agents. A running X server is necessary for graphics to function
(which we have so far avoided testing).
2022-11-29 20:04:53 -05:00
Matthew Kilgore a79c943d36 Add GLUT initialization tests
These tests cover all the commands that generally interact with GLUT.
The ensure that these functions can be used at the very beginning of a
program with no issues. Additionally they verify the behavior of these
functions in the presence of `$SCREENHIDE`, and also `_ScreenHide`.
2022-11-29 20:04:53 -05:00
Samuel Gomes 0e19bcc03c
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-28 08:29:33 +05:30
github-actions[bot] e12b13eebf Automatic update of ./internal/source 2022-11-27 21:41:39 +00:00
Steve McNeill 585a0cf31a
Merge pull request #264 from SteveMcNeill/main
Minor IDE tweaks
2022-11-27 16:23:50 -05:00
Steve McNeill 7894b8eec3
Merge branch 'main' into main 2022-11-27 14:50:00 -05:00
Samuel Gomes d13bf35822
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-28 01:05:07 +05:30
github-actions[bot] 6547bed5e0 Automatic update of ./internal/source 2022-11-27 19:32:17 +00:00
Samuel Gomes 8d0531211a
Merge branch 'QB64-Phoenix-Edition:main' into miniaudio-fixes 2022-11-28 00:46:45 +05:30
Matt Kilgore 2fb7080808
Merge pull request #267 from mkilgore/fix-ide-printing
Fix the 'Beginning C++' message to stop being printed when using the IDE
2022-11-27 14:13:56 -05:00
Matthew Kilgore 816126be08 Fix the Beginning C++ message being printed when using the IDE
This was overlooked in #258, previously this printing was being skipped
over via a check of idemode, but after changing where it was located so
it only prints once it now runs when using the IDE, which screwed up the
drawing of the IDE screen.

The simple fix is to check for idemode before doing the printing, which
is effectively what it was doing before anyway.

Fixes: #266
2022-11-27 12:41:07 -05:00
Steve McNeill d3f12be83b
Merge branch 'main' into main 2022-11-27 02:38:15 -05:00
SteveMcNeill 4e08c25057 Restore a little too much cut from last update. :P 2022-11-27 01:13:54 -05:00