Commit Graph
52 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 6333092801 MADE: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Coen Rampen 8ec8f65d5f MADE: Improve unpausing game when movie is playing
The movie player would use OSystem::getMillis to check the elapsed playing time
to keep audio and video in sync. This would go wrong when the game was paused
during movie playback, as the player would try to make up for the pause time,
fast forwarding the movie and breaking A/V sync.
This commit improves this by using Engine::getTotalPlayTime, which subtracts
pause time, and Mixer::getElapsedTime, which returns the actual length of audio
played. The player seems to restart later than the audio when unpausing, so it
still catches up for about 10 frames, but it's not as bad as before and it does
not lose A/V sync.
2021-10-09 16:59:45 +02:00
Coen Rampen 69629944e5 MADE: Use SFX sound type for sampled audio
The engine used the plain sound type for sampled sound effects and movie audio
and applied the SFX user volume control to the plain sound type. This caused
emulators like the AdLib emulator and Munt to be affected by the SFX user
volume control, because they use the plain sound type. This commit fixes this
by using the SFX sound type instead of the plain sound type. User volume is
applied by Engine::syncSoundSettings.

This commit also fixes the setSoundVolume script function. Volume was
previously applied to the SFX and speech sound types, which were not used.
Also, by directly using Mixer::setVolumeForSoundType, it would override the
user volume setting. This is fixed by storing the game sound volume in a field
and applying this to the current and future audio streams. This fixes bug
#6444.
2021-10-09 16:59:44 +02:00
Paul Gilbert 005561d305 COMMON: Increase Stream pos, seek, size from int32 to int64 2021-07-08 18:24:28 -07:00
Eugene Sandulenko 298ea1a76e MADE: Cleanup 2016-05-02 15:19:08 +02:00
Willem Jan Palenstijn 1a4f477d61 MADE: Fix movie audio glitches caused by reset of audio decoder
The sound buffer used in decompressSound() is now stored so that
it can be re-used in the next call of decompressSound, specifically
in chunk type 1.

This caused some clicking/static in the intro of Return to Zork.

Thanks to eriktorbjorn for noticing the glitch and writing most of the patch.
2015-07-19 20:26:50 +02:00
Strangerke ae2ba18af3 MADE: Initialize some variables 2015-01-28 07:47:28 +01:00
Johannes Schickel 5b70d34479 MADE: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Johannes Schickel 66fe0181ff MADE: Take advantage of Surface::getPixels. 2013-08-03 04:02:51 +02:00
Johannes Schickel 8f73027d82 MADE: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:32 +02:00
Johannes Schickel 79dfc7be97 MADE: Get rid of casts on OSystem::copyRectToScreen calls. 2012-06-16 02:38:59 +02:00
Johannes Schickel 7b126c5f24 MADE: Minimize #include usage. 2011-10-09 22:58:37 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel b6fc71b0c5 MADE: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:29:23 +02:00
Max Horn 0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
dhewg d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Max Horn 42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn a1840bd573 AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
2010-04-12 09:14:17 +00:00
Max Horn 1565f14bc1 Moved audio stream implementations (for MP3, FLAC, etc.) to new dir sound/decoders/
svn-id: r47579
2010-01-26 22:48:45 +00:00
Max Horn dc5e08e623 Move raw audio flags from sound/mixer.h to sound/raw.h
svn-id: r47395
2010-01-19 22:30:33 +00:00
Max Horn 557bb394de Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches.

svn-id: r47369
2010-01-19 00:56:29 +00:00
Max Horn 474d49946f Rename QueuedAudioStream to QueuingAudioStream
svn-id: r47179
2010-01-08 22:06:04 +00:00
Max Horn 7efba85064 Switch Tinsel, MADE and some of the video players to QueuedAudioStream
svn-id: r47178
2010-01-08 22:05:12 +00:00
Torbjörn Andersson 72eb9ec9ea Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.

svn-id: r46941
2010-01-03 19:37:43 +00:00
Filippos Karapetis decdc5771a Applied patch #2872409 "MADE engine fixes" by agent-q, with one small modification (initialized _soundStarted in the ScriptFunctions constructor)
svn-id: r44589
2009-10-04 09:31:37 +00:00
Benjamin Haisch 0762bb7cf6 - PMV player: Use frame count from PVM file and fix incorrect "invalid chunk type" warning
- Fix sprite drawing glitch with vertically flipped sprites (bug #2825925)

svn-id: r43521
2009-08-18 19:42:13 +00:00
Filippos Karapetis fd14ebba14 PMV player: stop reallocating the frame buffer on every frame, if its size hasn't been changed
svn-id: r39354
2009-03-12 08:14:05 +00:00
Benjamin Haisch 5b8105afb3 - Added support for The Manhole EGA version
- Support for 'chunked' picture resources and EGA pictures
- Improved the mouth sync in RtZ (still not perfect, though)
- Removed obsolete TODOs
- Fixed sfPlayMovie to return if the movie playback was aborted or not; this is used by RtZ to determine if it should display the credits screen after the intro movie

svn-id: r35997
2009-01-22 13:04:29 +00:00
Torbjörn Andersson b0fb307978 Fixed warnings.
svn-id: r35859
2009-01-14 05:49:18 +00:00
Filippos Karapetis 0ecaa8c4fd - PMV video headers are evaluated correctly now
- PMV video is now stopped correctly if the end of the video has been reached. Removed a relevant hack, which was caused due to an invalid memory read

svn-id: r35849
2009-01-13 20:36:52 +00:00
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Benjamin Haisch 8ffcd984b0 Implemented RTL support
svn-id: r34933
2008-11-07 21:59:25 +00:00
Max Horn 6bfa3e274a Got rid of File::eof()
svn-id: r34396
2008-09-06 21:23:08 +00:00
Benjamin Haisch b6ad2b0035 - Fixed umlauts in printText
- Don't exit when a pmv video couldn't be found

svn-id: r32817
2008-06-27 09:57:38 +00:00
Filippos Karapetis bf52cc2186 Clarification about the weird sound frequencies in PMV videos
svn-id: r32198
2008-05-20 18:20:17 +00:00
Benjamin Haisch cefff90ac6 RtZ: Fixed bug which caused PMV videos to look odd (noticeable in the intro movie) and optimized frame decompression code.
svn-id: r32182
2008-05-19 19:34:55 +00:00
Filippos Karapetis b4e9433820 Silenced MSVC warnings about uninitialized variables
svn-id: r31946
2008-05-08 12:20:08 +00:00
Benjamin Haisch b63ae7dee4 Possibly fixed the sound stuttering in the PMV videos and added frame skipping based on the Gob engine's IMD/VMD player.
svn-id: r31944
2008-05-08 11:17:38 +00:00
Benjamin Haisch a7f5150228 - cmd_return now exits the game if it returns from the main function
- Implemented cmd_exit
- PmvPlayer now exits "more gracefully" when the application is closed while playing

svn-id: r31930
2008-05-07 17:28:38 +00:00
Filippos Karapetis 14523bd3bb Fixed crash that occurred when skipping a video while MIDI music was active
svn-id: r31775
2008-04-29 15:51:22 +00:00
Filippos Karapetis 2172eee072 Center videos to screen
svn-id: r31715
2008-04-25 10:43:47 +00:00
Filippos Karapetis 54485c24c5 Some palette related fixes
svn-id: r31650
2008-04-21 20:20:34 +00:00
Filippos Karapetis 36bec1d5c8 Code merge
svn-id: r31648
2008-04-21 18:40:28 +00:00
Filippos Karapetis 008c4ca9d6 Added missing ScummVM headers
svn-id: r31647
2008-04-21 17:47:00 +00:00
Filippos Karapetis 4e62a13a67 Performed some optimizations to the PMV player
svn-id: r31644
2008-04-21 16:52:09 +00:00
Benjamin Haisch 7531e54006 Fixed palette handling in PMV videos.
svn-id: r31641
2008-04-21 11:05:44 +00:00
Torbjörn Andersson 179479f6f4 Made the sound less choppy. Though we may have to do some kind of double
buffering here to completely fix the problem.

svn-id: r31627
2008-04-20 19:17:36 +00:00
Filippos Karapetis ad6f9caf51 Compilation fixes by lordhoto
svn-id: r31619
2008-04-20 17:15:31 +00:00
Torbjörn Andersson 00a8c77527 Catch EVENT_QUIT events, too. I realize that g_system->quit() isn't the nicest
way to quit a game, but it beats not being able to quit at all.

svn-id: r31617
2008-04-20 16:18:50 +00:00