Commit Graph
100 Commits
Author SHA1 Message Date
ehofman 03a616b737 Add support for EXT_framebuffer_object for Atlas 2010-05-05 10:39:18 +02:00
ehofman 44c93d5074 Csaba Halasz: fix a compilation error for non-bsd systems that happen to return
const char* from dlerror().
2010-03-27 13:39:37 +01:00
ehofman dcf07a46aa Allow particles to be frozen on pause. 2010-03-27 13:38:59 +01:00
ehofman 64072be83c iprovide a slightly more helpfull exception message 2010-03-16 17:15:12 +01:00
ehofman 229abb8412 updated vendor test 2010-03-16 17:14:19 +01:00
ehofman 284bc364fe Lauri Peltonen: turn on clouds depth sorting 2010-03-03 23:11:01 +01:00
ehofman 1ace645505 small fix for when sound is disabled 2010-02-17 07:19:02 +01:00
ehofman 8e47f5d494 John Denker: Fix sneaky bug: 'mylibdir' variable getting trampled. 2010-02-17 07:18:20 +01:00
ehofman f9b064cc19 Joe User updates by John Denker 2010-02-14 19:42:51 +01:00
ehofman 6786a7be4a small MacOS fix 2010-02-10 14:55:57 +01:00
ehofman bb370a304d smnall update for MacOS without framework support 2010-02-10 14:55:57 +01:00
ehofman fdcf53c688 Properly test for OpenThreads and bail out if it isn't found 2010-02-10 14:55:57 +01:00
ehofman 68797e51c6 implement a round-robin scheme for random objects to make sure the same type of object is placed at the same spot all the time 2010-02-06 23:12:40 +01:00
ehofman 56d2f06631 Silently ignore previous errors to prevent halting the program on silly errors 2010-01-21 11:07:58 +01:00
ehofman 9e47911b19 define _device so testForALCError can use it initialized.. 2010-01-21 11:07:58 +01:00
ehofman 176e760de1 test for an AL or ALC error before calling an ALUT function. 2010-01-16 15:50:29 +01:00
ehofman c56f036bab Tatsuhiro Nishioka:
These patches fixes minor bug in addition to providing --with-openal-framework and --with-cocoa-framework.
Now you can use your own version of OpenAL.framework for selecting various audio output device.
Plus, you can build FG/SG on Snow Leopard with cocoa configuration.
2010-01-05 22:12:37 +01:00
ehofman 56919ae45f MacOS returns an unsopported AL error when a file is not found, work around this. 2010-01-05 22:10:22 +01:00
ehofman e8884b4ec0 Also unbind subsystem groups in reverse order and destruct them in reverse order to be consistent. 2009-12-31 19:42:53 +01:00
ehofman 5e79609955 unbind in reverse order to try to prevent order dependency problems. 2009-12-30 00:20:08 +01:00
ehofman 4950c96f1c Rearrange alut error checking a bit 2009-12-30 00:05:01 +01:00
ehofman 4cc17a7f6e keep a pointer to the OpenAL vendor and renderer for reference 2009-12-27 09:24:24 +01:00
ehofman c1246e8c4e proper typecasting 2009-12-14 22:46:22 +01:00
ehofman 1fe9755d01 fix a typo. 2009-12-12 00:03:41 +01:00
ehofman 1da09a4706 Don't assign the buffer data to the sample in case it is a file. Test for result when calling load() 2009-12-12 00:03:40 +01:00
ehofman f3c591469b Fix crash in SGSoundMgr::stop(): do not try to erase buffer items one at a time 2009-12-12 00:03:40 +01:00
ehofman b1200f9f59 add alcSuspendContext and alcProcessContext again to prevent sound artifacts on hardware accelerated soundcards. 2009-12-06 23:55:08 +01:00
ehofman 47617d6c04 check if suspend, resume and volume changed much from the previous value before setting them. 2009-12-03 06:38:23 +01:00
ehofman 4794ab6095 Fix runtime switching of sound devices. 2009-12-03 06:38:12 +01:00
ehofman bc85767f19 Updates to allow runtime chaning of the sound device 2009-11-30 22:41:14 +01:00
ehofman a0aaa23904 Add a function to retreive all available playback devices. 2009-11-29 13:04:39 +01:00
ehofman 27a6c72091 initialize volume to a proper value 2009-11-29 13:04:39 +01:00
ehofman 2dcc66f03e Small bugfix 2009-11-29 13:04:38 +01:00
ehofman d70a05a088 Make it possible to specify a different device name 2009-11-29 13:04:38 +01:00
ehofman 0f21c39e49 a slightly more readable version of the test 2009-11-26 16:05:46 +01:00
ehofman f6513127ce Also test for older versions of OpenAL-Sample 2009-11-26 16:05:45 +01:00
ehofman 878288f06a Don't forget to apply the doppler adjustment factor to the listener velocity also 2009-11-24 14:17:54 +01:00
ehofman 406cdf8d16 test for implementations with 'bad' doppler effects and adjust for it. 2009-11-24 14:17:54 +01:00
ehofman 5b28b024ae fix test programs 2009-11-24 14:17:54 +01:00
ehofman 7c693d8107 proper listener velocity calculation, this has no effect yet but is required when other models start emitting sounds. 2009-11-24 14:17:54 +01:00
ehofman afb18ca75b the wrong name also mislead me: rotate velocity to the proper quat 2009-11-19 23:01:49 +01:00
ehofman 01c62932bd make the relative positions fixed against the body again. 2009-11-18 23:25:55 +01:00
ehofman 6cd8db7b28 Set to default distance attenuation function but change the parameters a but for better sound effects (and most of all quieter sounds at greta distance 2009-11-18 23:25:51 +01:00
ehofman bb46d91bc6 What do you know, the real problem turned out to be the distance attenuation function.. 2009-11-17 06:43:41 +01:00
ehofman e3f70b7125 temporarily remove listener (viewer) and source offsets. they mess things up 2009-11-12 22:59:43 +01:00
ehofman 5b2af1f6b3 also recalculate the velocity in update_pos_and_orienation, so pass the north-east-down velocity directly and orientate position, orientation and velocity to OpenGL/OpenAL frames (x-right, y-up and z-back) 2009-11-10 16:29:16 +01:00
ehofman 59df72c4b0 allow sound effects in the configuration file to be added to the 'avionics' sample group by setting '<type>avionics</type>'. 2009-11-10 06:42:26 +01:00
ehofman fefe87ed1e Remove old MSVC6.0 files that doen't work anymore 2009-11-09 10:45:15 +01:00
ehofman b66905c2f6 Oops, it was the scenery up vector, not the viewer up vector 2009-11-07 08:52:16 +01:00
ehofman 39472e4d81 Save a costly SGVec3d::fromGeod() calculation 2009-11-07 08:52:16 +01:00
ehofman 85fba1325a pass the geodetic position and view orientation to the sky reposition function 2009-11-05 16:17:29 +01:00
ehofman 0f39f05fa1 small fixes 2009-11-04 23:05:22 +01:00
ehofman 8d551c2664 fix directional sound orientation 2009-11-04 23:05:21 +01:00
ehofman 346a22f684 adjust to recent changes 2009-11-04 23:05:21 +01:00
ehofman b1571e4437 some small fixes 2009-11-04 23:05:21 +01:00
ehofman 5ac2abe3ab Remove more unneeded code and properly set relative position and sound direction 2009-11-02 23:20:59 +01:00
ehofman 5b15426cc6 Small code reorganization, mostly removing unneeded code 2009-11-02 23:20:59 +01:00
ehofman 1ac944b7c1 Position and orientation fixes thanks to Tim Moore (finaly). Code optimizations by moving code over from SGSoundSample to SGSampleGroup which means it will only run once for every sample group instead of once for every sample. 2009-11-02 23:20:58 +01:00
ehofman fd90dbb123 silently clip pitch and gain to their maximum values 2009-11-01 21:52:37 +01:00
ehofman 6ccad91537 proper orientation(?) and comment out relative position and direction code since it messes with OpenAL in such a way that volume doesn't work properly anymore 2009-11-01 21:52:37 +01:00
ehofman c89db53ebf another attempt at getting something useful without any result. 2009-10-31 22:55:32 +01:00
ehofman 4ffd70a42a fix a typo 2009-10-31 22:55:26 +01:00
ehofman bbeb48a60d fix a gcc version test 2009-10-31 22:55:18 +01:00
ehofman aefe9bc116 MacOS X fix 2009-10-31 22:54:46 +01:00
ehofman bcb95f647d add relative pos back in 2009-10-31 00:03:27 +01:00
ehofman 145a7fa146 pass the float pointer to the isNaN function instead of the SGVec3 type 2009-10-29 23:04:17 +01:00
ehofman 06f0b6030a multiply quats in the right order 2009-10-29 23:04:17 +01:00
ehofman 191ee3a0ed Commit the current state of affairs to see if it fixes the position code for others 2009-10-29 23:04:17 +01:00
ehofman f6358694ae another test program, using real world locations 2009-10-29 23:04:17 +01:00
ehofman af14d65a98 Fix a bug where a sample was removed from the sample list before it was stopped. Proper listener orientation when inside the airplane (need to find a good solution for outside view). 2009-10-28 23:16:19 +01:00
ehofman 9fe75dc521 also test for NaN in listener code 2009-10-27 22:15:11 +01:00
ehofman 0051bea034 small code reorganization and addition of debugging tests. 2009-10-27 22:15:11 +01:00
ehofman 76c79dba8e FGViewer::recalcLookFrom turned out to be an excellent source of information for prosition and orientation 2009-10-26 23:07:47 +01:00
ehofman 84dc82506a re-enable sound positioning and velocity, test for NaN's and print a message when it happens (debugging, should be removed later on). 2009-10-26 18:50:00 +01:00
ehofman ae1625734c move all isnan() declarations from sample_group.cxx to compiler.h since it's too important not to have available everywhere. 2009-10-26 18:49:57 +01:00
ehofman a06a15e769 Use shared pointers for any reference to SGSoundSample, fix the constructor of SGSoundSample where data is supplied by the calling program. 2009-10-24 19:29:41 +02:00
ehofman 7c5de29b61 get rid of aut_ptr, it only works with objects that can destroyed with delete (and not even delete[]) which is too limited. take drastic actions to find the sound-not-playing-bug: set all positions and orientations to default all the time. 2009-10-24 19:29:41 +02:00
ehofman 5f9befebae .. and remove some debugging code 2009-10-22 22:52:05 +02:00
ehofman 6a7b885891 revert some test code 2009-10-22 22:52:05 +02:00
ehofman cd8e7bbdca should use free instead of delete for malloced data. 2009-10-22 22:52:05 +02:00
ehofman 5d731ad8c3 a few more temporarty debugging statements 2009-10-22 22:52:05 +02:00
ehofman 7964270929 fix a memory leak and add some temporary debugging statements. 2009-10-22 22:52:05 +02:00
ehofman ea513d392e Updates to the test utilies. 2009-10-22 22:52:05 +02:00
ehofman feba9024eb Fix a pause situation where more code was executed than expected. Unbind an OpenAL buffer from an OpenAL source when requested to stop playing. 2009-10-21 16:25:29 +02:00
ehofman b3e16ce8e0 use auto_ptr instead 2009-10-19 23:50:17 +02:00
ehofman 31dd77c694 do not yet add the relative sound position to the absolute position, it's generating NaN's at the moment. Fix a bunch of other small bugs 2009-10-19 23:50:17 +02:00
ehofman ae58f89fbf sigh, forgot another alut* at the wrong place. 2009-10-19 23:50:17 +02:00
ehofman b3bc36b253 restore some part of the code to prevent an untwanted segmentationf fault. 2009-10-18 18:07:19 +02:00
ehofman 7287509fef Start the sound manager in a deactived state. This means the code now has to activate it explicitly when desired. A non active state means the update function will no be executed. 2009-10-18 18:06:55 +02:00
ehofman 0d5634475c Don't delete the sample data if it wasn't constructed as a file. It's now deleted when calling free_data() by the owner or in the destructor. 2009-10-18 12:07:38 +02:00
ehofman e6bfe7d40c revert to previous version 2009-10-18 12:07:25 +02:00
ehofman 811cd0653f make sure update_late isn't executed when dt=0 2009-10-17 23:47:20 +02:00
ehofman e2b8a21ff5 documentation, licensing, copyright and small api updates. 2009-10-17 23:47:06 +02:00
ehofman 24c7941f65 convert _relative_pos to a vector of doubles and set the relative offset 2009-10-17 13:39:34 +02:00
ehofman 600a9ee4c5 _data is not an array of pointer 2009-10-17 13:39:34 +02:00
ehofman fdfdfedf01 Alut < 1.0 fixes and finaly fix the sound orientation 2009-10-17 13:39:33 +02:00
ehofman a67688322d Initialization was done much earlier than expected resulting in some sample
groups not being activated (and sample loading using OpenAL/ALUT functions to
be scheduled before OpenAL was initilialized).

fix alutInit counter
remove left over static declaration fro SGSoundMgr::load
2009-10-16 11:14:05 +02:00
ehofman 6fe057e277 add a debugging statement 2009-10-16 11:14:05 +02:00
ehofman f23e8bfb02 fix for latest changes 2009-10-16 11:14:05 +02:00
ehofman eab9da98f2 give the sample class as much info as possible to properly position and orientate the sounds. unfortunately at this time orientation seems to be from straight behind which means that sounds that have outer-gain set to 0.0 will not be heard yet. 2009-10-16 11:14:05 +02:00