aboutsummaryrefslogtreecommitdiff
path: root/src/sound_openal.cpp
AgeCommit message (Collapse)Author
2018-03-24Cleanup sound manager class (#7158)Loïc Blot
* Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-03-23Global initialization of sound using SoundManagerGlobal (#7063)nOOb3167
* Global initialization of sound using SoundManagerGlobal
2017-09-27Fix recent commit: std::max -> std::fmax for floats (#6469)Paramat
Fixes commit a455297d297c0819a7eff89e51e5f01a5ac731c3 <cmath> header was already present in commit.
2017-09-25Positional sound: Limit volume when closer than 1 nodeparamat
Change OpenAL distance model from AL_INVERSE_DISTANCE to AL_INVERSE_DISTANCE_CLAMPED to avoid excessive volume when very close to the sound location, for example MTG doors, and MTG fire sounds which are combined at an average position and often located in air nodes. Because AL_REFERENCE_DISTANCE has been reduced to 1 node (the distance under which gain is clamped), multiply volume by the same factor to keep sound gains the same as before, since the gain is calculated as: gain = (AL_REFERENCE_DISTANCE / distance)
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-08-19Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
2017-06-14Fix no sound bug (#5968)Rui
2017-06-11Sound: Add pitch option (#5960)Rui
* Sound: Add pitch option
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-03Sound API: Add fading soundsBrandon
2017-02-09OpenAL sound: Use a simpler distance modelparamat
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.
2016-10-05Make some maps unordered to improve performanceLoic Blot
* This permit to improve performance on C++11 builds * use some existing typedefs in tools maps * minor code style changes
2016-08-10couple of memory leaks fixes.David Carlier
2015-12-01Remove unused OpenALSoundManager::m_can_vorbis and EXT_vorbis checkJay Arndt
2015-11-15sound_openal.cpp: remove unused headerest31
2015-11-14Load sound from memoryest31
* 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-10-14Use warningstream for log messages with WARNINGShadowNinja
Remove DTIME macro and its uses, too
2015-08-25Change i++ to ++iDavid Jones
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2014-12-12Use std::string::empty() instead of size() where applicableAnton
2014-03-12Pass arguments by referenceSelat
2013-04-07fix memory leak on sound shutdownsapier
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-09-01Fix issue with openal mac os x compileThomas Lauro
2012-06-17Properly and efficiently use split utility headersPerttu Ahola
2012-06-17Initially split utility.h to multiple files in util/Perttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-04-06Handle failing openal init properly, add enable_sound and sound_volume settingsPerttu Ahola
2012-04-06Attempt to fix sound left-right channelsPerttu Ahola
2012-03-27Do a dumb-ass static string copy for const-incorrect old versions of ov_fopenPerttu Ahola
2012-03-25Sound loading from memory (by using a quick hack)Perttu Ahola
2012-03-25Almost support loading sounds from serverPerttu Ahola
2012-03-24Fix build on MinGW (as compared to Linux)Perttu Ahola
2012-03-24Lua API for playing soundsPerttu Ahola
2012-03-24Add sounds, tune thingsPerttu Ahola
2012-03-24c55sound continuedPerttu Ahola
2012-03-24celeron55's sound system initial frameworkPerttu Ahola