Commit Graph

2328 Commits

Author SHA1 Message Date
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
ehofman
f161992836 Alex Buzin:
I got an error with the Sunday CVS - FG crashed while exiting .
gdb reports SIGSEGV error at file soundmgr_openal.cxx, line 159.

Error was fixed by changing lines 157-159 from:
        buffer_map_iterator buffers_current = _buffers.begin();
        buffer_map_iterator buffers_end = _buffers.end();
        for ( ; buffers_current != buffers_end; ++buffers_current ) {
to :
        buffer_map_iterator buffers_current;
        while(_buffers.size()){
            buffers_current = _buffers.begin();
2009-10-14 00:34:39 +02:00
ehofman
babf58f8d2 Correct (and verrified) position, orientation and velocity vector. Todo: proper sound orientation (the all face forward using the airplane orientation now) and disabling doppler effect when tied to the listener 2009-10-12 00:01:07 +02:00
ehofman
968f5d7693 OpenAL buffer management; add a buffer cache to prevent loading the same sample in memory twice. Especially useful to save memory for multi-aircraft configurations and (later) for AI models. 2009-10-12 00:00:53 +02:00
ehofman
4cc6bd69ae add the option to tie a SampleGroup to the listener position and orientation 2009-10-08 10:17:11 +02:00
ehofman
199437e859 alut pre-1.0 doesn't support aletGetError but then again, this function doesn't get called in that case either so just comment it out at build time 2009-10-08 10:17:11 +02:00
ehofman
5d14b84969 fix a typo 2009-10-07 08:19:47 +02:00
ehofman
bcccd06cee (try to) properly align model and viewer 2009-10-07 08:19:33 +02:00
ehofman
6b0ab9a49a default listener (master volume) default to 0.0 to save some ugly code in FlightGear 2009-10-06 07:22:06 +02:00
ehofman
023002ae73 add the alc.h header file vor OpenAL context related code 2009-10-06 07:22:06 +02:00
ehofman
579d384c04 Rename update() to update_late() for the sound manager to be able to initialize it before any other class that uses it. This will allow the SoundManager to be safely accessed in the constructor of those classes. 2009-10-06 07:22:06 +02:00
ehofman
e2e1524454 Initial commit of the new sound system, expect more updates to follow 2009-10-06 07:22:06 +02:00
ehofman
b784bebaa9 just small fixes 2009-09-28 23:40:06 +02:00
Tim Moore
3456434e37 check for null effect in EffectCullVisitor
An EffectGeode might not have any effect.
2009-09-18 15:43:46 +02:00
Tim Moore
454c5b1ed2 Merge branch 'tat/configure' into next 2009-09-17 12:25:19 +02:00
torsten
dc2c437a1a Tatsuhiro Nishioka:
Patches for configure.ac and Makefile.am files in FG/SG so Mac developers can build these in a unix way.
These also enables Mac developers to choose either PLIB framework or PLIB static libs.
2009-09-17 12:24:56 +02:00
Tim Moore
819d3f5ded Merge branch 'topic/projection' into next 2009-09-17 12:22:06 +02:00
frohlich
4f802689f2 Correct finite precision issues.
Use consistent function names.
Implement changes consistently over the different vector sizes.

Modified Files:
	SGVec2.hxx SGVec3.hxx SGVec4.hxx
2009-09-17 12:21:42 +02:00
Tim Moore
9cbbe55598 Merge branch 'frohlich/weak' into next 2009-09-17 12:18:33 +02:00
frohlich
7e2dafdcb8 Make the weak pointer work. Some bits were left when importing.
Modified Files:
	SGSharedPtr.hxx SGWeakPtr.hxx
2009-09-17 12:18:07 +02:00
jmt
c7873d68f7 Logging:less verbose sound loading. 2009-09-17 12:13:47 +02:00
jmt
939ec526a8 Logging: quiet down STG parsing. 2009-09-17 12:13:47 +02:00
jmt
b20a635db0 Logging: quiet down model/image loading policy. 2009-09-17 12:13:47 +02:00
jmt
a656bee0df Logging: quiet the BVH building policy. 2009-09-17 12:13:47 +02:00
jmt
42f07e3f14 Logging: quiet material loading. 2009-09-17 12:13:47 +02:00
jmt
5803b05bd5 Logging - downgrade play/stop messages to debug. 2009-09-17 12:13:47 +02:00
John Denker
ccf0ba50c4 Implement vector _projection_ functions. 2009-09-09 23:28:16 +02:00
John Denker
f3bc977d32 Make "repeat" start slower on pick-animation mouse events;
otherwise it is unusable.
2009-09-09 22:54:13 +02:00
ehofman
80609e0816 Dont execute code in case the soundmanager isn't properly initialized 2009-09-09 08:39:56 +02:00
frohlich
795d481ca6 Switch to new vector conversion functions.
Modified Files:
	simgear/math/SGGeod.cxx simgear/math/SGQuat.hxx
	simgear/math/SGVec2.hxx simgear/math/SGVec3.hxx
	simgear/math/SGVec4.hxx simgear/scene/material/Effect.cxx
	simgear/scene/model/SGInteractionAnimation.cxx
	simgear/scene/model/SGMaterialAnimation.cxx
	simgear/scene/model/SGRotateTransform.cxx
	simgear/scene/model/SGScaleTransform.cxx
	simgear/scene/model/SGTranslateTransform.cxx
	simgear/scene/model/animation.cxx
	simgear/scene/model/particles.cxx
	simgear/scene/model/placement.cxx
	simgear/scene/model/shadanim.cxx
	simgear/scene/sky/CloudShaderGeometry.cxx
	simgear/scene/sky/cloud.cxx simgear/scene/sky/cloudfield.cxx
	simgear/scene/sky/dome.cxx simgear/scene/sky/sky.cxx
	simgear/scene/tgdb/GroundLightManager.cxx
	simgear/scene/tgdb/SGOceanTile.cxx
	simgear/scene/tgdb/SGTexturedTriangleBin.hxx
	simgear/scene/tgdb/SGVasiDrawable.cxx
	simgear/scene/tgdb/TreeBin.cxx simgear/scene/tgdb/obj.cxx
 	simgear/scene/tgdb/pt_lights.cxx
	simgear/scene/util/SGUpdateVisitor.hxx
2009-09-09 08:39:55 +02:00