Commit Graph

20 Commits

Author SHA1 Message Date
Ozkan Sezer f641321f97 removed the cdplayer facility added in 0.85.3
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 10:02:16 +00:00
Ozkan Sezer cbb7eb0428 Backported external music files support using decoder libraries and the
new raw samples interface from Hammer of Thyrion (uhexen2) :
- bgmusic.c, bgmusic.h: New BGM interface for background music handling.
  Handles streaming music as raw sound samples.
- bgmnull.c: BGM source for cases where the engine is configured for no
  sound.
- cl_main.c: Include bgmusic.h. Call BGM_Stop() and CDAudio_Stop() in
  CL_Disconnect().
- cd_sdl.c: Moved bgmvolume boundary checking to bgmusic.c upon value
  changes.
- gl_vidnt.c, gl_vidsdl.c, cl_parse.c: Include bgmusic.h. Add BGM_Pause()
  and BGM_Resume() calls along with CDAudio_ counterparts.
- cl_parse.c: Replace CDAudio_Play() call by the new BGM_PlayCDtrack()
  which first tries CDAudio_Play() and then streaming music if it fails.
- host.c: Include bgmusic.h. Call BGM_Update() just before S_Update()
  in Host_Frame(). In Host_Init(), call BGM_Init() after other audio init
  calls. In Host_Shutdown(), call BGM_Shutdown() before all other audio
  shutdown calls.
- snd_dma.c: Include snd_codec.h and bgmusic.h. Call S_CodecInit() from
  S_Init(). Call S_CodecShutdown() from S_Shutdown().
- snd_codec.c, snd_codec.h: New public codec interface for streaming
  music as raw samples. Adapted from quake2 and ioquake3 with changes.
  Individual codecs are responsible for handling any necessary byte swap
  operations.
- snd_codeci.h: New header for snd_codec internals.
- snd_wave.c, snd_wave.h: Codec for WAV format streaming music. Adapted
  from ioquake3 with changes.
- snd_vorbis.c, snd_vorbis.h: Codec for Ogg/Vorbis format streaming music.
- snd_mp3.c, snd_mp3.h: Codec for MP3 format streaming music using libmad.
  Adapted from the SoX project with changes.
- Makefile: Adjusted for the new sources. Added switches USE_CODEC_WAVE,
  USE_CODEC_MP3, USE_CODEC_VORBIS for enabling and disabling individual
  codecs.
- Windows makefiles and project files as well as other CodeBlocks project
  files will be updated shortly.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@374 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 19:50:43 +00:00
Ozkan Sezer 0e3e259be3 Made CDAudio_Play() to return success (0) or failure (-1) instead of void.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@368 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-02 18:33:21 +00:00
Ozkan Sezer b0550eeacd Minor cd_sdl.c cleanups from uhexen2. Reorganized cdaudio volume
handling. If volume is 0, don't bother advancing and pause.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@351 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-12-30 14:55:25 +00:00
Ozkan Sezer b1585b3039 more fixes for deprecated conversion from string constant to char*:
handle the -safe command line switch using a new global safemode,
check for safemode in the related driver init functions and remove
the safeargvs & co from common.c and COM_InitArgv().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@307 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:55:41 +00:00
Steven 5c57699095 Back out Oz's cd-sdl.c changes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@297 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:06:16 +00:00
Ozkan Sezer 7957d214ba cd_sdl.c: cleaned up the latest mess a little. restricted track progressing
to the cd player facility only.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@293 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:04:16 +00:00
Steven 6beef00279 cd fix needed fo gameplay
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@292 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 01:28:40 +00:00
Steven 627ffd4f64 Make "cd play" progress tracks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@291 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 00:35:22 +00:00
Ozkan Sezer 834e2cf868 * cd_sdl.c (export_cddev_arg): make putevn() actually work.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@290 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:46:16 +00:00
Ozkan Sezer 010a465de2 * cd_sdl.c (export_cddev_arg): fixed bad snprintf and the crash it was
causing.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@289 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 23:20:16 +00:00
Ozkan Sezer dbd624bdf8 cd_sdl.c: no need for uhexen2's CVS version identifier to stay here.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@288 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 17:23:39 +00:00
Ozkan Sezer dcf0cd11bf * cd_sdl.c (get_cddev_arg): fix stupid typo in uppercasing.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@287 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 15:55:54 +00:00
Ozkan Sezer c6627995cc * cd_sdl.c (get_cddev_arg): check for null or empty arguments also
for non-windows platforms.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:32:34 +00:00
Ozkan Sezer 27fc06b792 * cd_sdl.c: Remove unnecessary SDL_getenv.h include.
(CDAudio_Init): Move the bad ugly hack about SDL_CDROM environment
variable into the new export_cddev_arg() helper. FOr the -cddev option,
call the new get_cddev_arg() helper.

(export_cddev_arg): SDL_CDROM environment variable hack moved from
CDAudio_Init() to here. Fixed bad strcat() usage orto the array. Made it
for non-windows platforms only.

(get_cddev_arg): Added for checking the argument to the -cddev option.
For non-windows platforms just return the argument itself. For windows,
arg should be like "D:\", make sure it is so, but tolerate args like "D"
or "D:", as well.

(CDAudio_Next): Make static. Minor cleanups.

(CDAudio_Prev): Make static. Minor cleanups.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@285 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 14:05:32 +00:00
Steven 93dd4d8bb1 cd command tweaks
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@284 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 10:31:00 +00:00
Steven fb745fe815 Add "cd next" and "cd prev" commands. Add a new "-cd" option , which in combination with "-dedicated", allows QS to be a stand-alone cd player... Useful\!
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@283 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 09:49:03 +00:00
Steven 38b8119eb7 Set SDL_CDROM environment variable when using -cddev. Some doco updates.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@282 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-23 04:12:19 +00:00
Ozkan Sezer 243602a6e8 cd_sdl.c: replaced the stub with the implementation we have in the uhexen2 project.
cd_null.c: added new file.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@26 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-16 12:51:25 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00