29 Commits

Author SHA1 Message Date
Brandon
893c2dfb5e Sound API: Add fading sounds 2017-05-03 03:12:45 +01:00
paramat
3e350d23b8 OpenAL sound: Use a simpler distance model
In createPlayingSoundAt(), AL_ROLLOFF_FACTOR is not set, so it has
the default value of 1.0, this makes the equation of the currently
used AL_EXPONENT_DISTANCE distance model identical to the equation
of the simpler AL_INVERSE_DISTANCE distance model.

Using AL_INVERSE_DISTANCE means an exponent is not processed,
exponents are quite intensive to process.
There is no change in sound attenuation behaviour.

The commented-out AL_ROLLOFF_FACTOR value is removed as it would
now have a different effect if used.
2017-02-09 00:10:35 +00:00
Loic Blot
0df837698f Make some maps unordered to improve performance
* This permit to improve performance on C++11 builds
* use some existing typedefs in tools maps
* minor code style changes
2016-10-05 07:30:32 +02:00
David Carlier
443165b7b9 couple of memory leaks fixes. 2016-08-10 16:59:32 +02:00
Jay Arndt
5ca0373713 Remove unused OpenALSoundManager::m_can_vorbis and EXT_vorbis check 2015-12-01 00:36:11 +00:00
est31
87c4b5b49d sound_openal.cpp: remove unused header 2015-11-15 08:17:32 +01:00
est31
792446f426 Load sound from memory
* Remove trailing lines from src/sound_openal.cpp
* Don't do a horribly ugly copy of the file's path, allocating and deallocating a
	10 kb buffer in the process. This copy was needed for backwards compatibility
	with libvorbis 1.3.1 and earlier, as the removed comment explains.
	However, even Ubuntu precise has 1.3.2 already. Dropping support and sparing
	the ugly copy can therefore be considered safe.
* Actually load sounds from the memory, not caching them at the disk first,
	removing the old hack. This is the main motivation for the commit.
2015-11-14 18:17:32 +01:00
ShadowNinja
29e8adeadc Use warningstream for log messages with WARNING
Remove DTIME macro and its uses, too
2015-10-14 01:36:48 -04:00
David Jones
9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
Craig Robbins
27791ee1aa For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Anton
420b5ec08c Use std::string::empty() instead of size() where applicable 2014-12-12 15:16:24 -05:00
Selat
a83693c5c3 Pass arguments by reference 2014-03-12 17:34:48 -04:00
sapier
311815d3f6 fix memory leak on sound shutdown 2013-04-07 23:43:34 -04:00
Sfan5
3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
269f01224b Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Thomas Lauro
ea4fd9b1a0 Fix issue with openal mac os x compile 2012-09-01 18:19:59 +03:00
Perttu Ahola
ec937ecdd8 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola
e05f1af484 Initially split utility.h to multiple files in util/ 2012-06-17 01:29:13 +03:00
Perttu Ahola
e70b6545b1 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola
8ba0f2deb1 Handle failing openal init properly, add enable_sound and sound_volume settings 2012-04-06 15:30:36 +03:00
Perttu Ahola
35e62fb3eb Attempt to fix sound left-right channels 2012-04-06 00:39:37 +03:00
Perttu Ahola
2ed270a8ed Do a dumb-ass static string copy for const-incorrect old versions of ov_fopen 2012-03-27 00:06:26 +03:00
Perttu Ahola
809798690d Sound loading from memory (by using a quick hack) 2012-03-25 15:52:43 +03:00
Perttu Ahola
4be45a2c43 Almost support loading sounds from server 2012-03-25 14:48:22 +03:00
Perttu Ahola
8a9e0e6746 Fix build on MinGW (as compared to Linux) 2012-03-24 23:16:09 +02:00
Perttu Ahola
026f4f2fc8 Lua API for playing sounds 2012-03-24 19:01:26 +02:00
Perttu Ahola
c602655b31 Add sounds, tune things 2012-03-24 04:24:26 +02:00
Perttu Ahola
cb281450b1 c55sound continued 2012-03-24 04:24:25 +02:00
Perttu Ahola
48359ec57f celeron55's sound system initial framework 2012-03-24 04:24:23 +02:00