Commit Graph

281 Commits (8c6ca5cb914f460b88ef0697ac8f0d1dea1c638d)

Author SHA1 Message Date
Per Inge Mathisen f2cf35f791 Enumerating devices apparently crashes PulseAudio on Fedora12, so try to do this in a more
limited way and hope that either this fixes the problem, or someone fixes the issue upstream
meanwhile. This was fixed in a different way in 2.3 branch due to different sound init code.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8861 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:02 +01:00
Buginator f5b417e7d0 Remove unneeded abort that was already removed in 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8754 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:49 +01:00
i-nod e1bfeffa26 - Merged PrintOpenALVersion with sound_InitLibrary since the current usage isn't completely correct. alGetString should be called after a new context was successfully created.
- Changed sound_InitLibrary so it would present all available devices to the debug and dump logs before trying to activating one of them.
- Added successfully opened device name to the debug and dump logs.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8328 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:53 +01:00
Buginator 0aff0b46cf Add a new debug flag type, LOG_FATAL.
This is used to differentiate LOG_ERROR (which is a *non* fatal error, but a error none the less) and fatal errors which result in program termination with no *visible* output (on windows/macs) on our end because of the crappy GUI functions so we usually dump it to stderr.txt and there is no clue that the program had to exit for whatever reason.

Hopefully, this will be helpful to windows people so they can differentiate between *our* exit/abort routines, and crashes that occur in drivers which look exactly the same since they get dumped back to the desktop with no visible clue why.

LOG_FATAL is *always* on in both debug & release builds.

On LOG_FATAL debug lines, on windows, we now throw up a modal dialog box with the current error message.  At this time, this only happens when we have a error, and we use abort() right after the error, which makes it fatal.

That explains why this touches ~60 files :)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8320 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:51 +01:00
Buginator 1f4e8a08ab Add openAL extensions, remove openAL attributes from Crash Dump info. Attributes were not useful.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8241 4a71c877-e1ca-e34f-864e-861f7616d084
2009-10-10 14:49:23 +02:00
Buginator 2c03546f87 partial revert of r5763
Clean up and fix 3D sound.
We now have true 3D sound that works correctly.

See ticket:920 for more information about the revert.

fixes ticket:220


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8098 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:01 +02:00
Buginator cd24361f83 revert r3270
Bring back all the missing screams that were mistakenly removed, and also bring back the yell for help, since that will be used soon.  (all removed in r3270)
Also reverts r8025 / r8030 (see ticket:830 for more info) since I didn't know the sounds were removed.


fixes ticket:830

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8097 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:01 +02:00
Buginator 61763ee07d When a "looped" sample has finished playing, we reset iAudioID, so the game adds the sample again into the queue. This is the way most other "looped" samples are currently handled by the game. (oil/power/factory steam, and so on)
see:770
fixes:770


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8031 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:12 +02:00
Christian Ohm 5accd8f706 Commit the cleaned up version of Buginator's sound patch. Closes #770.
This fixes the removal of unused sources, which didn't work correctly before.
The number of sources is still not limited, but the number of sounds used
concurrently is much lower now.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8010 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:09 +02:00
Christian Ohm f7b14177e6 Change an ASSERT to ASSERT_OR_RETURN in sound_StopSample.
This fixes the segfault in the second crashdump in #703.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7945 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:00 +02:00
Buginator 2f92b730ad Fix a typo in sound_SetObjectPosition() to use (...x,y,z) instead of (...x,x,x)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7903 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Buginator 27bdf48197 slight cleanup of r7738
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7739 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:35 +02:00
Buginator 1ccb1487de Create a new function, addDumpInfo(), to be used to add custom information to the crash dump report file.
Currently, we query openAL & openGL vendor/version info.
This should give us more descriptive crash reports on the user's hardware.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7738 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:34 +02:00
Per Inge Mathisen fb980b636c Ease up on the volume of repeat testing done on the audio code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7407 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:32 +02:00
Buginator 1855990fa8 Change non-fatal debug messages in the sound code from LOG_ERROR to LOG_WARNING instead.
fixes ticket:427

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7382 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:13 +02:00
Buginator f17402ef40 excise the codebase from some C99 format specifiers.
(%zu -> %lu)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7120 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Per Inge Mathisen f15c0292e8 Fix some issues with 'make dist'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-15 23:30:57 +00:00
Gerard Krol 71bc279c9e Fix some spelling errors in debug messages and comments. Patch by Paul Wise <pabs3>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6832 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 11:51:40 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Giel van Schijndel ae18d97e54 Don't depend on OpenAL and Vorbis when compiling with --disable-sound
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6542 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-11 14:34:38 +00:00
Buginator c5c02052d6 Add Hack from ticket:115
Forces window XP users to also use a software device for openAL.  (already the default for the other platforms & vista).  This allows 256 sources, instead of 16.
Note: *this is windows specific* and will not affect the other platforms.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6223 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-26 17:10:42 +00:00
Giel van Schijndel ceeb8780c7 Explain the "funny" iteration used to iterate over OpenAL devices
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6199 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-22 17:19:43 +00:00
Buginator 48eacfbc3d Dump out available devices available for openAL in the PrintOpenALVersion() function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-21 18:40:05 +00:00
Giel van Schijndel 64910221e7 Fix several warnings that occur on NDEBUG builds:
* Missing returns from function
 * Functions that are defined in both DEBUG and NDEBUG builds but only used in DEBUG builds

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6179 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 14:22:29 +00:00
Giel van Schijndel 71ddbdc5e4 Cleanup:
* Mark several parameters that aren't being used (but shouldn't be removed) with WZ_DECL_UNUSED
 * Use "(unsigned )?int" instead of "[SU](D?WORD|BYTE)" where the size guarantee is not required
 * Instead of "(X - Y) >= 0" use the logically equivalent and more readable "X >= Y"
 * Remove redundant function prototypes
 * Move variables into a more local scope where possible
 * Assign the result of an expression to a variable once so that the expression doesn't have to be duplicated several times
 * Move constant UNALLOCATED_OBJECT out of the header and into the only source file where it's ever used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6160 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 21:03:23 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Giel van Schijndel 58117a87c0 * Remove duplicate sound effect pcv483.ogg
* Rename pcv483.ogg to power-transferred.ogg


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6117 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 21:49:58 +00:00
Buginator 21fdab0117 Modify debug output to specify the 'real' directory that physfs is using for the file in question.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5958 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 20:00:54 +00:00
Giel van Schijndel 37c6aa9fd6 Make sure to clean up the sound streams as well in function sound_ShutdownLibrary()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5884 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 20:12:47 +00:00
Giel van Schijndel 19b72f1ce5 * Use alGetError() instead of sound_GetError() to clear error codes (the latter will also dump a debug message to LOG_SOUND)
* Remove some redundant debug(LOG_NEVER calls (they're preceded by a sound_GetError() call which will already dump that info)
 * Improve some comments
 * Log sound errors to LOG_SOUND, not to LOG_NEVER
 * In sound_DestroyStream make sure to bail out when we fail to retrieve the buffer count (as that could cause memory over-allocation)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5860 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 12:41:10 +00:00
Buginator 82966293ad Fixes a openAL case where we didn't check if a openAL call failed or not.
(NOTE, this is really a temp fix, so it don't crash/cause more openAL errors. The sound code need a rewrite to correctly fix this problem)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5853 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-23 19:44:00 +00:00
Giel van Schijndel a293a90e76 * Rename audio_Get3DPlayerPos to audio_GetPlayerPos and change it to return a Vector3f instead
* Rename audio_Get3DPlayerRotAboutVerticalAxis to audio_GetPlayerOrientation and change it to return two Vector3f's with a forward and upward pointing vector in it (which can be directly used by OpenAL)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5763 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 17:51:43 +00:00
Giel van Schijndel b2e83cabc1 Add some ASSERTs to check for dodgy pointers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5715 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-30 20:42:02 +00:00
Giel van Schijndel ac5c52031b Get rid of unnecessary assignment of `volume` to `music_volume`; just utilize clipf right away on `volume`
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5559 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 13:01:22 +00:00
Per Inge Mathisen d7eabccb74 Comment out alIsSource assert
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:46:53 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Giel van Schijndel 623044cf7c Add some debug messages when failing to create an AUDIO_STREAM in sound_PlayStreamWithBuf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:27 +00:00
Per Inge Mathisen 1f831ebd3d Add beginnings of self-test to openal and general audio subsystems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5456 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:07:42 +00:00
Per Inge Mathisen 2aeda4d91e Improve playlist selftest. It now covers the entire playlist API. Remove unused
playlist declaration from header file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5448 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:19:57 +00:00
Per Inge Mathisen ee6452eb64 Revert r5426. It will not work quite like that, since the pointers refer
to a list in audio.c. The horror! The horror!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5428 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 18:24:42 +00:00
Per Inge Mathisen 74aeca0093 Change current_queue_sample to a pointer to an AUDIO_SAMPLE instead of
an integer value. This fixes the problem of AL_INVALID being used for
invalid values, while it is really a perfectly valid ID for a sample.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5426 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:45:33 +00:00
Per Inge Mathisen 4d1d5b4c11 Add an error check to patch #1082: Fix AL_INVALID_NAME bug, to catch the
currently impossible case of the sample not being in the active list.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5425 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:11:58 +00:00
Per Inge Mathisen 22d4eb3fe1 patch #1082: Fix AL_INVALID_NAME bug, sans one no good assert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:12:14 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde fec1f446d3 Use clipf to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:32 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Per Inge Mathisen 5ea6c60eee Do not initialize music sound system when --nosound option given.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:32:06 +00:00
Giel van Schijndel bc810ca2e2 Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 20:15:20 +00:00