summaryrefslogtreecommitdiff
path: root/src/i_pcsound.c
AgeCommit message (Collapse)Author
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-04-01Replace all snprintf() calls with M_snprintf().Simon Howard
The Windows API has an _snprintf function that is not the same as Unix's snprintf(): if the string is truncated then no trailing NUL character is appended. This makes the function unsafe. Define a replacement/wrapper called M_snprintf that works the same but always appends a trailing NUL, for safety on Windows and other OSes that behave like this. Do the same thing for vsnprintf(), and update HACKING to list snprintf/vsnprintf as forbidden functions. This fixes #375; thanks to Quasar for pointing out the different behavior of these functions.
2014-03-29misc: Add string utility functions.Simon Howard
It's more readable to write "M_StringEndsWith(..." than doing a bunch of pointer arithmetic, and this is a common pattern. Also add M_StringStartsWith, M_StringJoin and M_StringCopy. The latter is a safe alternative for strcpy() that works the same as OpenBSD's strlcpy(). Use these functions in a few places where it makes sense.
2014-03-23pcsound: Extend frequency table to 128 entries.Simon Howard
Extend from 96 to the full 128 entries found in the frequency table in the Vanilla .exes. This was helpfully posted by Gez to the Doom wiki: http://doomwiki.org/wiki/Talk:PC_speaker_sound_effects Change from the current scheme of storing frequency values to using the timer divisor values used by the Vanilla .exes; divide into the PC timer frequency to calculate the frequencies to play. Thanks to Gez for dumping the full list of frequencies; this fixes #336.
2009-11-21Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1737
2009-09-30Change British English spellings to American English, for consistency.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1699
2008-12-01Add missing header includes.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1398
2008-09-25Add option to low-level sound API to disable the DS prefix for soundSimon Howard
effects, for Heretic. Fix sound links. Subversion-branch: /branches/raven-branch Subversion-revision: 1281
2008-09-08Fix disabled PC speaker sounds.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1215
2008-09-08Split off some of the s_sound.c code into i_sound.c and reimplement theSimon Howard
old low-level sound API as a thin wrapper around the module system. Decouple the low-level code from the high-level code. Subversion-branch: /branches/raven-branch Subversion-revision: 1212
2008-09-07Move dehacked code to doom/. Split dehacked string replacement code intoSimon Howard
common code and remove dependencies on deh_main.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1210
2008-09-06Remove includes of doomdef.h where possible, move generic parts into topSimon Howard
level. Subversion-branch: /branches/raven-branch Subversion-revision: 1204
2008-05-02Add W_CacheLumpNum,Name API to WAD code for releasing a lump back toSimon Howard
cache when it is no longer needed. Switch existing code to use the new API instead of Z_ChangeTag. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1134
2008-02-28Add fixes for MSVC warnings (thanks entryway).Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1095
2008-01-24Make lookup tables const where possible.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1015
2007-10-18Shut up signed / unsigned comparison warnings.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 978
2007-06-21Add arrlen() macro as a clearer way of doing sizeof(array) /Simon Howard
sizeof(*array) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 922
2007-06-17Split i_sound.c into i_sdlsound.c, i_sdlmusic.c, with generic "soundSimon Howard
driver" modules, one for PC speaker and one for digital output. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 913
2007-03-10Lots of changes/additions:Russell Rice
* Add libpcsound codeblocks project * Use libraries that are built and project dependencies inside main chocolate-doom/setup project and remove source files. * libraries are now built in the "lib" top level directory * Fix some warnings Subversion-branch: /trunk/chocolate-doom Subversion-revision: 852
2007-03-09Move the pcsound library to the top level, alongside textscreen.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 849
2007-03-07Use native endianness for sound output, rather than always LSB. Add PCSimon Howard
speaker code! Subversion-branch: /trunk/chocolate-doom Subversion-revision: 844