way MP3 obfuscates custom tags. Vorbis and FLAC are fine. (I could make it work with MP3,
but you should be using Vorbis instead.) They are:
* LOOP_START: Start time for the loop. If omitted, the song repeats from the beginning.
* LOOP_END: End time for the loop. If omitted, the song loops at the end. (If you need to specify this, why aren't you using a shorter song.)
You only need to specify one of these tags to set the custom loop. Naturally, you can set
them both, as well. The format for each tag is the same:
* If it contains a colon (:), it specifies by time. This may be of the form 00:00:00.00
(HH:MM:SS.ss) to specify by play. Various parts may be left off. e.g. To start the loop
at 20 seconds in, you can use ":20", 0:20", "00:00:20", ":20.0", etc. Values after the
decimal are fractions of a second and accurate to one millisecond.
* If you don't include a colon but just have a raw number, then it's the number of PCM
samples at which to loop.
* Any characters other than digits (0-9), colons (:), or a single decimal point for the
seconds portion will result in the tag being ignored.
SVN r2424 (trunk)
atexit for it, which gets executed after the sound system shuts down.
- Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is
unsigned now.
SVN r2188 (trunk)
* Looping sounds that have been playing for a very long time, were evicted,
and then were restarted need to have their positions clamped to lie
within the bounds of the sounds. If we try to set a start position very
far beyond the end, it will overflow inside FMOD and not work.
* A start time of 0 is not actually valid and means the sound was never
assigned a start time.
- The latter bug also reveals a problem with starting looped sounds evicted:
They need to be assigned a start time so if they should have the opportunity
to start later, they will be properly synchronized.
SVN r1987 (trunk)
unsigned integer that can use all 32 bits. They must therefore use
the unsigned mul instruction rather than the signed imul instruction.
- Fixed several signed/unsigned comparison and possibly uninitialized
variable warnings flagged by GCC.
SVN r1965 (trunk)
position when evicting sounds, because restarting the sound system causes
the DSP clock to restart at 0, so start times that were recorded before
the reset are no longer applicable after the reset.
- Fixed: S_StopChannel() always set the channel's actor to NULL, eliminating
origin information when resetting the sound system.
SVN r1949 (trunk)
in the gameinfo.
- Added Yes/No selections for Y/N messages so that you can answer them
entirely with a joystick.
- Fixed: Starting the menu at the title screen with a key other than Escape
left the top level menu out of the menu stack.
- Changed the save menu so that cancelling input of a new save name only
deactivates that control and does not completely close the menus.
- Fixed "any key" messages to override input to menus hidden beneath them and
to work with joysticks.
- Removed the input parameter from M_StartMessage and the corresponding
messageNeedsInput global, because it was redundant. Any messages that want
a Y/N response also supply a callback, and messages that don't care which
key you press don't supply a callback.
- Changed MKEY_Back so that it cancels out of text entry fields before
backing to the previous menu, which it already did for the keyboard.
- Changed the menu responder so that key downs always produce results,
regardless of whether or not an equivalent key is already down.
SVN r1753 (trunk)
and a list of all attached controllers, and a second level for configuring
an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
with an older DLL. This combination will now produce sound.
SVN r1717 (trunk)
- Added more output to zipdir and a -q option to turn it off.
- Added -u option to zipdir to only recompress those files in a zip that have
changed.
- Added -d and -f options to zipdir. -d forces deflate compression, and -f
forces a write of the zip, even if it's newer than all the files it contains.
- Added support for bzip2 and LZMA compression to zipdir.
SVN r1468 (trunk)
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
SVN r1450 (trunk)
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occasional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
SVN r1447 (trunk)
256 to 1024 to deal with a module that otherwise would not load.
- Removed the artificial restriction on not supporting Vorbis-compressed
samples in XMs if they are stereo, since it turns out that OggMod does
support them.
SVN r1316 (trunk)
do it the old way and scan every channel to see if it matches an actor/
entchannel pair.
- Fixed: S_RelinkSounds() did not move the SoundChans bitfield to the new
actor.
- Fixed: Stolen channels could be kept around by the high-level channels
indefinitely.
SVN r1289 (trunk)
* This may or may not be a problem, but GCC warned that FStateDefinitions::
AddStateDefines() does not initialize def.FStateDefine::DefineFlags, so
I fixed that.
SVN r1262 (trunk)
- Fixed: ThingCountSector and ThingCountNameSector did not remove enough
entries from the stack, and did not put the result in the right slot.
- Fixed: Teleport lines were prioritized over secret lines when deciding what
color to draw them on the automap.
- Fixed: Death-reverting morphs did not remove the morph item from the
player's inventory when death caused the morph to revert.
- Updated fmod_wrap.h for FMOD Ex 4.18.
SVN r1259 (trunk)
- Removed extraneous printf parameter for Texman.Init startup message.
- Added newlines to the ends of a few headers that were missing them.
- Fixed more GCC errors/warnings.
SVN r1232 (trunk)
The rolloff and channel ended callbacks now call functions in s_sound.cpp
instead of working on the data itself and GSnd->StopSound has been replaced
with S_StopChannel.
SVN r1227 (trunk)
so that all files are included by a central one instead of compiling
each one separately. This speeds up the compilation process by 25%
when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.
SVN r1226 (trunk)
fact that NVidia's don't report it, even though they support it. If there
are any cards that no longer have antialised lines on the automap, please
let me know.
- Added vid_hwaalines cvar to force antialiased lines off for the
Direct3D renderer, in case it doesn't really support them.
SVN r1210 (trunk)
method to the SoundRenderer class so that this function doesn't need to
load the sound for the NullSoundRenderer.
- Took some more non-FMOD related code out of fmodsound.cpp, including the
code that checks for raw and Doom sounds. This means that sfxinfo_t is no
longer needed in the SoundRenderer class so I took out all references to it.
SVN r1208 (trunk)
to the rolloff information back to NULL when starting the sound fails.
- Fixed: Rolloff information was taken from the sfxinfo that contained the
actual sound data, not the one that was used for starting the sound.
SVN r1206 (trunk)
and sectors are done in s_sound.cpp and not in fmodsound.cpp. Also removed
several 'sector' parameters because they were never used inside the sound code.
SVN r1200 (trunk)
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
owned. Having owned inventory items interact with the world is not supposed
to happen.
- Fixed: case PCD_SECTORDAMAGE in p_acs.cpp was missing a terminating 'break'.
- Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.
SVN r1068 (trunk)
during it.
- UI sounds are now omitted from savegames.
- Fixed: Menu sounds had been restricted to one at a time again.
- Moved the P_SerializeSounds() call to the end of G_SerializeLevel() so that
it will occur after the players are loaded.
- Added fixes from FreeBSD for 0-length and very large string buffers
passed to myvsnprintf.
SVN r1063 (trunk)
sounds are handled.
- Why do polyobjects have a 3D start spot? Flattened it to 2D.
- Moved the sector sound origin calculation out of fmodsound.cpp and into
s_sound.cpp so that the near sound limiting will use the correct sound
location for deciding on neighbors.
SVN r1061 (trunk)
arbitrary point. It has been replaced with a variant that takes a polyobject
as a source, since that was the only use that couldn't be rewritten with the
other variants. This also fixes the bug that polyobject sounds were not
successfully saved and caused a crash when reloading the game. Note that
this is a significant change to how equality of sound sources is determined,
so some things may not behave quite the same as before. (Which would be a
bug, but hopefully everything still sounds the same.)
SVN r1059 (trunk)
run into the adjacent columns.
- Added a NullSoundRenderer so that most of the checks against a NULL GSnd
can be removed.
- Fixed: Looping sounds must always successfully allocate a channel, even if
it's only a pre-evicted channel.
SVN r1058 (trunk)
the rest of the game is concerned, these sounds will never stop once they
have been started until they are explicitly stopped. If they are evicted
from their channels, the sound code will restart them as soon as possible.
This means that instead of this:
if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1))
{
S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
}
The following is now just as effective:
S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
There are also a couple of other ramifications presented by this change:
* The full state of the sound system (sans music) is now stored in save
games. Any sounds that were playing when you saved will still be
playing when you load. (Try saving while Korax is making a speech in
Hexen to hear it.)
* Using snd_reset will also preserve any playing sounds.
* Movie playback is disabled, probably forever. I did not want to
update the MovieDisable/ResumeSound stuff for the new eviction
tracking code. A properly updated movie player will use the VMR,
which doesn't need these functions, since it would pipe the sound
straight through the sound system like everything else, so I decided
to dump them now, which leaves the movie player in a totally unworkable
state.
June 26, 2008
- Changed S_Sound() to take the same floating point attenuation that the
internal S_StartSound() uses. Now ambient sounds can use the public
S_Sound() interface.
- Fixed: S_RelinkSound() compared the points of the channels against the
from actor's point, rather than checking the channels' mover.
- Changed Strife's animated doors so that their sounds originate from the
interior of the sector making them and not from the entire vertical height
of the map.
SVN r1055 (trunk)
that animated icons can be done with it.
- Changed FImageCollection to use a TArray to hold its data.
- Fixed: SetChanHeadSettings did an assignment instead of comparing
the channel ID witg CHAN_CEILING.
- Changed sound sequence names for animated doors to FNames.
- Automatically fixed: DCeiling didn't properly serialize its texture id.
- Replaced integers as texture ID representation with a specific new type
to track down all potentially incorrect uses and remaining WORDs used
for texture IDs so that more than 32767 or 65535 textures can be defined.
SVN r1036 (trunk)
consideration the size and shape of the sector producing the sound. See
the lifts on Doom 2 MAP30 and compare with previous versions.
- Fixed: The stop sound for sector-based sound sequences was not played with
the CHAN_AREA flag.
- Removed the distinction between S_Sound() and S_SoundID() functions. Use
S_Sound() for both names and IDs from now on.
SVN r1034 (trunk)
any zone you want.
- Using a too-recent version of FMOD now gives an error, since there may be
breaking changes to the API from one version to the next (excluding
revisions in stable branches, which only represent bug fixes).
- Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone
unnoticed before: The delayhi and delaylo parameters for Channel::setDelay()
and getDelay() were swapped.
SVN r1032 (trunk)
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
SVN r995 (trunk)
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
SVN r989 (trunk)
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
SVN r973 (trunk)
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Added support for quoted strings to the TiMidity config parser.
SVN r957 (trunk)
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
SVN r954 (trunk)
there were no designated characters to strip at the end of it.
- Added support for Shoutcast/Icecast playlists.
- Added an error message when a playlist could not be opened.
- Added support for PLS format playlists, in addition to M3U.
- Changed FPlayList to use an array of FStrings.
- Fixed: Playlists required every song to be specified by an absolute path.
SVN r951 (trunk)
waveforms, and three of them are non-negative. This can cause a tendency
for the resulting output waveform to go into very high ranges depending on
the timbres used, and Heretic's exemplify this problem.
- Reduced the OPL volume level slightly.
- Fixed: The waveform view from snd_drawoutput was upside-down.
SVN r949 (trunk)
EMIDI specs: Track designations and exclusions should be ignored past
the initial beat, and EMIDI program change and volume events should be
ignored unless they were used in the initial beat.
SVN r944 (trunk)
could also be because the user selected PCM-Float output, but the driver
doesn't support it (even if it claims to *cough*Audigy XP drivers*cough*).
SVN r943 (trunk)
track off, any ticks that had only events on the disabled track would cause
the delay for that track to be thrown away, and the following notes on
enabled tracks would play too soon. This could be heard quite clearly in
xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing
of tracks 13 and 14 (EP1 Melody and EP1 Echo).
SVN r937 (trunk)
already playing on the channel, it should stop it with finish_note(), not
kill_note(). This can be clearly heard in the final cymbal crashes of
D_DM2TTL where TiMidity cuts them off because the final cymbals are played
with a velocity of 1 before the preceding cymbals have finished. (I wonder
if I should be setting the self_nonexclusive flag for GUS patches to
disable even this behavior, though, since gf1note.c doesn't turn off
duplicate notes.)
- Changed envelope handling to hopefully match the GUS player's. The most
egregious mistake TiMidity makes is to treat bit 6 as an envelope enable
bit. This is not what it does; every sample has an envelope. Rather, this
is a "no sampled release" flag. Also, despite fiddling with the
PATCH_SUSTAIN flag during instrument loading, TiMidity never actually
used it. Nor did it do anything at all with the PATCH_FAST_REL flag.
SVN r934 (trunk)
3D panning.
- The listener's velocity is now set at 0 for the sound engine. The player
moves so fast that you can hear the doppler shift just by running around,
otherwise.
- Changed the sound code so that all sounds that start playing on a single
tic actually start playing at the exact same sample position.
SVN r927 (trunk)
wave file.
- Changed the default channel velocity for MUS files from 64 to 100 to
better match apparent MIDI practice. (Would like to know what this is
supposed to be.)
- Changed the mus2midi channel assignments to match the internal player's.
- Fixed: apply_envelope_to_amp() should clamp the mix levels to 0.
SVN r926 (trunk)
timidity_voices cvar.
- Added stats lines for the OPL and Timidity MIDI devices.
- Completely changed the way TiMidity volume calculations are done. It
should now be extremely close to the output a real GUS would produce with
its official MIDI player (excepting where TiMidity normalizes sample
volumes). The new equations more closely match what is specified by the DLS
and SF2 specs (but not quite), so I presume it's also more musically
correct than what TiMidity (and TiMidity++) do.
SVN r925 (trunk)
before sending it to Channel::getReverbProperties().
- Fixed: The earthquake effect did not play its sound as an actual looping
sound. I'm a bit surprised this only recently started causing problems.
SVN r923 (trunk)
snd_reset would eventually run into the hard limit on the total number
of FMOD::System objects that can be created concurrently (currently 15).
- Added proper error checks to the FMOD initialization process.
SVN r921 (trunk)
- Set note velocity back to using a linear sounding volume curve, although
it's now used to scale channel volume and expression, so recompute_amp()
is still only doing one volume curve lookup.
- Fixed: TimidityMIDIDevice caused a crash at the end of a non-looping song.
SVN r920 (trunk)
- Changed: When loading Zips all patches in the patches/ directory should
be loaded, not only those used by a texture in TEXTUREx.
- Disabled timidity_mastervolume for the internal Timidity again because
with the altered volume calculation it is no longer needed and the default
volume is on the same level as OPL and FMOD.
SVN r909 (trunk)
FMOD_INIT_ENABLE_PROFILE. Renamed the corresponding cvar to snd_profile.
- Removed the normalize parameter from SoundStream::Play().
- Disabled the chorus and reverb effects added to SDL_mixer's Timidity,
because they were probably never tested well, either. Thanks to the bug
in vc_alloc(), they were never even activated.
- Restored the exact frequency range search that was missing from SDL_mixer's
verion of select_sample().
- Fixed: vc_alloc(), kill_others(), and note_on() treated Voice::status as a
bit mask, when it's not. These were changes made to SDL_mixer's Timidity.
- Restored the original Timidity volume equation. The other louder one was
put in when I didn't realize all channels were mono and many notes sounded
too quiet because they never completed their attack phase.
- Fixed: FileReader::Gets() acted as if fgets() always read the maximum
number of characters.
- Fixed: FileReader::Open() did not set FilePos and StartPos to 0.
SVN r908 (trunk)
because it has the same sound volume issues as the external one.
- Replaced use of stdio in Timidity with FileReader and added the option to read
from the lump directory. If the main config file is inside the lump directory
it will assume that everything else is as well. If it is a real file it will be
assumed that the rest is real files as well.
- Fixed: None of the error returns in Timidity::read_config_file closed the file being read.
SVN r906 (trunk)
- Fixed: MinGW doesn't have _get_pgmptr(), so it couldn't compile i_main.cpp.
- Fixed: MOD_WAVETABLE and MOD_SWSYNTH are not defined by w32api, so MinGW
failed compiling the new MIDI code.
- Fixed: LocalSndInfo and LocalSndSeq in S_Start() need to be const char
pointers, since "" is a constant.
- Fixed: parsecontext.h was missing a newline at the end of the file.
SVN r904 (trunk)
particular, this meant that every channel was almost certainly in mono mode,
which can sound pretty bad if the song isn't meant to be played that way.
- Added bank numbers to the MIDI precaching for Timidity, since I guess I do
need to care about banks, if even the Duke MIDIs use various banks.
- Fixed: snd_midiprecache only exists in Win32 builds, so gameconfigfile.cpp
shouldn't unconditionally link against it.
- Fixed: pre_resample() was still disabled, and it left two samples at the end
of the new wave data uninitialized.
SVN r903 (trunk)