Commit graph

25 commits

Author SHA1 Message Date
Andrei Alexeyev
8b37d1cbf2
src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
Andrei Alexeyev
be7905d6a3
src: run upkeep 2024-05-17 04:58:47 +02:00
Andrei Alexeyev
8480d41b7b
Audio rewrite (#236)
This replaces SDL_mixer with an internal streaming and mixing system,
relying only on basic SDL audio support. It's also a partial refactor of
the audio API, most notably BGM-related. The BGM metadata resource type
is gone, as well as the `.bgm` files. The metadata is now stored inside
the `.opus` files directly, using standard Opus tags.
2020-06-22 17:41:03 +03:00
Andrei Alexeyev
ae8194ae78
Various fixes & improvements for concurrent loading (#235)
- RESF_UNSAFE is removed.
- Resources that don't have to be finalized on the main thread can load
completely asynchronously.
- A thread waiting for a concurrent task to complete can start executing
that task itself if it hasn't started yet.
- Refactor the resource loading interface, add support for load-time
dependencies.
- Main-thread finalization of asynchronously loaded resources is now
spread out across multiple frames to mitigate frametime spikes.
- Remove some archaisms from the resource management code.
- Fix potential hashtable synchronization issue.
- Fix some deadlock edge cases.
- Don't spawn more worker threads than there are CPU cores (degrades
performance).
- Add TAISEI_AGGRESSIVE_PRELOAD env variable to attempt to aggressively
discover and preload every possible resource.
- Make r_texture_fill{,_region} expect optimal pixmaps, so that it's
never forced to convert them on the main thread. The optimal format may
be queried with the new r_texture_optimal_pixmap_format_for_type API.
These functions will also no longer needlessly copy the entire image
into a staging buffer - previously they did this even if no conversion
was needed.
- Other random changes to facilitate the stuff above.

The overall effect is somewhat faster load times.

Of course it's still all terrible and full of lock contention because I
suck at concurrent programming, but it's not worse than it was.
Probably.
2020-06-09 03:01:53 +03:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
a63e8f4a69
Add a basic music room 2019-03-11 01:21:43 +02:00
Andrei Alexeyev
abe4ddf260
refactor audio (module system like that of renderer) 2019-03-05 21:43:01 +02:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei "Akari" Alexeyev
ca16c30966 large refactoring WIP
windows & osx untested
bgm untested
too many changes to comment on
2017-03-05 00:39:17 +02:00
Andrei "Akari" Alexeyev
18652576d6 Use hashtables for resource management 2017-02-28 22:51:47 +02:00
Andrei "Akari" Alexeyev
c6a03b2e06 Minor readability issue 2017-02-23 18:34:10 +02:00
Andrei "Akari" Alexeyev
397719a2a2 Switched from GNU C99 to Standard C11. Enabled pedantic warnings.
Fixed all warnings and compile errors.
Confirmed successful compilation without warnings for linux (gcc,
clang), windows (gcc-mingw), osx (clang-osxcross).
2017-02-23 13:16:52 +02:00
makise-homura
3e83967bf2 Migrate from OpenAL/ALUT to SDL2_mixer 2017-02-18 04:21:33 +01:00
Andrei "Akari" Alexeyev
802cacb799 Config callback system
No more hacks in options menu code to update stuff when a setting
changes
2017-02-17 20:23:22 +02:00
Andrei "Akari" Alexeyev
32f7edd24e Refactored config into a macro hell 2017-02-17 18:03:49 +02:00
Martin Herkt
582b2f9dd9
Fix minor pointer/memory management issues 2017-02-15 14:35:07 +01:00
Andrei "Akari" Alexeyev
9a7a874783 Use the standard bool type instead of that stupid enum
Also removed all of the annoying trailing tabs/whitespaces
2017-02-11 05:56:47 +02:00
makise-homura
4b26b3ebb9 Boss BGM title now may have different color rather than same as stage tilte color (this makes sense on stage 4) 2017-02-03 18:56:36 +03:00
makise-homura
319d844b7a Fixed bgm stopping order if BGM not found (should first stop existing BGM, and then free its resources). 2017-01-31 01:02:03 +03:00
makise-homura
0ad5a46c75 Volume controls changed to sliders from "0..10" value list 2017-01-31 00:55:53 +03:00
makise-homura
573ea5e49c start_bgm: Make BGM stop playing if new BGM is not found (instead of still playing old BGM). 2017-01-30 22:20:07 +03:00
makise-homura
85d324b42c Another minor fixes according to upstream 2017-01-24 17:47:50 +03:00
makise-homura
815ae7b23b Added background music subsystem. 2017-01-24 16:40:57 +03:00