Jan Engelhardt
48953868df
build: resolve 101 instances of -Wunused-variable
2024-11-04 22:20:18 +01:00
Azamat H. Hackimov
8d2935c32c
Fix some warnings on uninitialized MVE variables
2024-09-12 15:11:32 +03:00
Azamat H. Hackimov
3f588adb0a
Fix audio distortions on MVE playback with pipewire backend
...
Don't define fixed buffer length for audio device, SDL2 calculates desired length itself.
Minor cleanups and fixes to virtual class and constructor.
2024-08-29 16:29:46 +03:00
Louis Gombert
60c5dbf1fe
CMake: add all headers to target sources
...
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00
Azamat H. Hackimov
f78bd57a81
Merge pull request #489 from Lgt2x/mve-no-sound
...
Support -nosound option for movie playbacks
2024-07-19 13:41:41 +03:00
Louis Gombert
998e834068
Support -nosound option for movie playbacks
2024-07-14 19:06:21 +02:00
Azamat H. Hackimov
4b8328cdfa
Use correct sample size for processing
...
Change mveaudio_process() to use sample size defined by stream.
2024-07-12 17:03:28 +03:00
Azamat H. Hackimov
976f00a1f3
Use SDL_QueueAudio() instead callbacks on filling sound buffer
...
Fixes some issues when sound buffer get exhausted before refilling.
2024-07-12 17:03:28 +03:00
Azamat H. Hackimov
ae279d1211
Documenting ISoundDevice classes
2024-07-09 03:42:52 +03:00
Azamat H. Hackimov
32df86203a
Cleanup d3movie.cpp
...
Remove unused variables, minor fixes.
2024-07-09 03:42:52 +03:00
Azamat H. Hackimov
c6eb9a8908
MVE: rename lnx_sound to sdl_sound
...
Now this is cross-platform playback.
2024-07-09 03:42:52 +03:00
Azamat H. Hackimov
4f0e0f87a5
Cleanup MVE library
...
Remove old implementation, cleanup unused code.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
9672475f70
Update MVE playback on Windows
...
There only one problem still persist on playback - slow filling sound buffer from std::deque on MSVC Debug mode due extremely slow performance of STL containers on that mode. On Release and RelWithDebInfo playback is fine.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
8fd119bd3d
MVE: Make timer code crossplatform
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
a39ccfc3ca
MVE: Implementing class for sound playback
...
Implemented abstraction layer and SDL backend.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
2f288f6dc9
MVE: use deque for FIFO buffer
...
Replacing circular ring implementation with queue that keeps decoded data between SDL audio callbacks.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
8d56e1c1ff
MVE: Migrate to SDL2 functions
...
Replaced SDL 1.2 legacy calls to SDL2 equivalents.
Changed spec.size to fixed value 4096 as values obtained from file can produce sound stuttering.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
96c240a4c0
MVE: Add support for big-endian systems
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
afd7c1a636
MVE: Initial sound support
...
Sound supported by SDL backend.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
a8784ee524
MVE: Implementing frame playing (main menu)
...
Reorganized MVE to use own MVESTREAM pointer for each opened MVE file.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
99ec2e3a5e
MVE: Refactoring code
...
Merge libmve.h into mvelib.h
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
b94458f561
MVE: Switch to D2X implementation (first run)
...
Adapting movie and mve interfaces each other.
Converted open() to fopen() et al. calls.
movie expected image as RGB565 from old mve, but now it's RGB555, so there no need additional conversion. Fixed hicolor related conversion of width in movie's callbacks. Headers cleanup in both subsystems.
Sound and frame callbacks are still unavailable.
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
a5b86bd0fb
MVE: convert libmve files to C++
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
ce74c43b44
MVE: add copyright headers, clang-format
2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
ef60434f72
Add D2X implementation of MVE
...
Added D2X implementation licensed under GPLv3 terms.
Cut from c030c4531a
2024-07-09 03:40:49 +03:00
Louis Gombert
91c18fefc5
Windows SDL2 compilation
2024-06-29 18:21:37 +02:00
GravisZro
f7ae658fe2
Modernize struct/enum/unions type declarations
2024-05-30 03:35:17 -04:00
GravisZro
5e5e0c99c3
Replace "short" with "int16_t" and fix missing headers
2024-05-23 23:49:31 -04:00
GravisZro
fe855cf85e
Fix missing header includes/restore third-party files
2024-05-23 23:14:40 -04:00
GravisZro
cc67b9230a
Replace "signed short" with "int16_t"
2024-05-23 23:04:15 -04:00
GravisZro
3dcd21b717
Replace "unsigned short" with "uint16_t"
2024-05-23 23:03:29 -04:00
GravisZro
a00639be24
Replace "signed char" with "int8_t"
2024-05-23 22:59:50 -04:00
GravisZro
1618040db5
Replace "unsigned char" with "uint8_t"
2024-05-23 22:58:46 -04:00
GravisZro
0556786c12
Replace "signed int" with "int32_t"
2024-05-23 22:55:41 -04:00
GravisZro
2147cfa68b
Replace "unsigned int" with "uint32_t"
2024-05-23 22:51:16 -04:00
GravisZro
dec9de7456
64-bit fixes
...
Switch all the (u)long types to (u)int32_t where appropriate.
2024-05-22 18:14:45 -04:00
Thomas Roß
0c09eed1b7
[Win,x64] Replaced inline assembly for int3 with debug_break() to fix compile errors in x64 builds.
2024-05-15 19:55:45 +02:00
JeodC
a4ab78192c
Join license header with historical commentrs
...
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.
Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Edu García
3440667e93
remove unused code (mainly windows.h)
2024-05-07 23:45:33 +01:00
Louis Gombert
0e69bf465f
Merge pull request #241 from icculus/ryan-sdl2-port
...
Initial SDL2 port
2024-05-06 08:57:20 +00:00
Ryan C. Gordon
65b1a7dc3b
sdl2: Fix broken audio in MVE playback.
...
This doesn't fix the audio gaps, just the static introduced in the SDL2 port.
SDL2 does not initialize the audio callback's buffer, unlike SDL 1.2, under
the assumption the callback is going to fully write it anyhow. But since
the movie player wants to mix against the current contents of the buffer,
we need to explicitly initialize it to silence first.
2024-05-05 10:14:50 -04:00
Jacob Coby
b64f17fb17
Merge branch '64bit-fixes' of github.com:jcoby/Descent3 into jcoby-64bit-fixes
2024-05-03 16:46:11 -04:00
Ryan C. Gordon
f8a4cb3cc0
More X11 removal.
...
This is all unused stuff, just doing a more-complete purge.
2024-04-30 13:04:15 -04:00
Jacob Coby
a6a6869a7e
64 Bit-Safe Updates
...
Imported Icculus' 64-bit changes.
Changes `[un]signed long` data types to `[un]signed int`.
2024-04-29 14:10:09 -04:00
Ryan C. Gordon
6c8977caf0
Heavy patching for compiler warnings.
...
The vast majority of this is fixing up `char *` that should be `const char *`
but a handful of other fixes, like potential buffer overflows that GCC
noticed, etc, were applied as well.
This removes `-Wno-write-strings` from CMakeLists.txt, as it is no longer
necessary, as there is no longer a flood of compiler warning spam when
building.
This does not fix all compiler warnings; there are still a handful, and they
are legitimate, but they can be dealt with in a future commit.
2024-04-29 00:18:56 -04:00
Thomas Otto
00389c50ea
Some more CMake white space formatting
...
- tabs to spaces
- use Unix line endings everywhere
- newline at end of file
- remove trailing white space
- no space between keywords and opening parenthesis
- use 2 spaces to indent
2024-04-21 11:46:32 +02:00
Kevin Bentley
44c4f867e8
Removed extraneous license
2024-04-20 10:15:38 -06:00
Kevin Bentley
d819437f58
Removed extraneous license text.
2024-04-20 10:15:08 -06:00
Kevin Bentley
1f45163248
Updated source to reflect the license that this code is released under.
2024-04-20 09:57:49 -06:00
Louis Gombert
c2b71b8147
Standardize CMake formatting
...
lowercase function names, blocks indent
2024-04-20 14:45:49 +02:00