1
0
Fork 0
Commit graph

208 commits

Author SHA1 Message Date
James Turner
25bf3793bd Reset: fix a static in play-audio-sample
Had to add this to FGGlobals, since it needs to be cleaned up
alongside the sound manager (which ideally it would be owned by, 
but that's a change for another day)
2013-11-25 23:53:58 +00:00
James Turner
6eb4e833ae Reset: sound manager can be shutdown cleanly 2013-11-12 22:50:18 +00:00
James Turner
80fb317eeb Don't speak < or > when using Festival.
Patch from HomerJ, avoid sending some additional special
characters to Festival, which renders then as 'greater than' /
'less than'.
2013-10-20 09:43:48 +01:00
James Turner
386d87e098 Cleanup exit handling.
Replace many lingering calls to exit() from the code,
replacing most with exception throws, which can be
caught by the existing mechanisms.

Update the option-parsing code to return an explicit
value indicating what to do (e.g., exit status to return
to the shell).
2013-10-15 22:16:50 +01:00
Tom Paoletti
81cd33e2fa Performance optimization: empty() instead of size()>0
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:01:59 +01:00
ThorstenB
b8a3d6902e Stop AI aircraft's sound when removing
Sound manager keeps a reference to _fx, so reducing its ref-count isn't
enough - it must be removed explicitly.
2012-11-27 00:02:28 +01:00
ThorstenB
9bb9a78249 Stash properties 2012-10-13 15:45:15 +02:00
ThorstenB
575f576aa9 Revive master sound enable switch. 2012-10-05 00:17:28 +02:00
ThorstenB
06a8a9c536 Fix Linux build: "malloc" needs stdlib.h 2012-10-04 21:14:48 +02:00
James Turner
bcea720db3 Make the sound-manager optional in a few places. 2012-10-01 10:10:34 +01:00
James Turner
21d50b11f5 Make FGVoicePlayer.hxx not require sample_openal.hxx 2012-09-30 20:23:13 +01:00
James Turner
7b8804bd40 Tolerate refactored SGSound headers.
An upcoming commit will make the sound headers standalone, and no longer include various other headers / using std:: declarations. Prepare for this by making includes and usage of namespaces explicit.
2012-09-30 19:40:08 +01:00
James Turner
4456f42e67 Make the view-manager and sound-manager independent.
Use properties to pass current-view information to the sound-manager, so there is no hard-coded dependency between the subsystems.
2012-09-25 09:17:00 +01:00
ThorstenB
9d08cfc24a Sound Manager: support subsystem reinit
instead of using property listener.
Also moved run-time init to standard init phase.
2012-09-21 15:33:13 +02:00
ThorstenB
7415696492 Create FGSoundManager as a wrapper for SGSoundMgr_OpenAl
and sink all sound related code from main.cxx in there.
2012-09-17 13:45:31 +02:00
ThorstenB
0f462d4a6e Fix rpmlint/Linux packager complaints
about outdated/invalid FSF address in some license headers.
2012-05-05 01:42:41 +02:00
Erik Hofman
47a910bccc Make sure _avionics is enabled before calling suspend, this fixes a crash caused by the way AI models are handled now. 2012-03-31 11:45:28 +02:00
ThorstenB
bc9331fc3f No avionics sound group for aimodels. 2012-03-22 23:53:18 +01:00
ThorstenB
7d37f6af58 Don't crash on start-up when avionics sound is disabled.
FGFX::init/soundfx::init use "_avionics" unconditionally, so it has to be
valid, even when avionics sound is disabled. Also allow to properly
enable/disable avioncis sound at run-time.
2012-03-22 23:36:39 +01:00
ThorstenB
f0c729f2d5 #545: Fix ATC chatter sound settings being ignored
FGSampleQueue is initialized at run-time, long after preferences are
loaded from the persistent files - so it should not reset anything.
2011-12-27 13:04:09 +01:00
Erik Hofman
babe714de7 reaneble ai modeul sound effects 2011-12-12 10:49:09 +01:00
ThorstenB
7f5dfe1421 Provide error message when file isn't found. 2011-12-11 14:06:17 +01:00
ThorstenB
cc40660206 Performance improvement
Avoid frequently creating/dropping an identical sound sample, when the
nav radio signal is flickering. Always keep most recent sound when signal
is lost (only stop it/turn volume off).
2011-12-04 21:43:21 +01:00
Erik Hofman
61e60484c8 make the sound of the base model work again. this also gives an indication where things start to go wrong. 2011-12-03 15:29:04 +01:00
Erik Hofman
831f81d97c Properly construct a string from another string and an integer, use a relative path for sound construction, allow enable/disable aimodel sounds using /sim/sound/aimodels/enabled 2011-12-03 14:40:48 +01:00
Erik Hofman
ebcc6359b9 Initials sound support for AI models. 2011-11-25 13:39:10 +01:00
Erik Hofman
04395fa9a5 Postpone initialization of the avionics soundgroup until avionics are enabled. This prevents AI classes from creating new and unnecessary avionics sample groups. 2011-11-20 15:31:58 +01:00
Erik Hofman
64102d0da9 Allow for a different property root location besides '/' 2011-11-20 15:03:48 +01:00
Frederic Bouvier
f1d0ac52a6 Fix MSVC9 build 2011-11-14 08:38:58 +01:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
James Turner
b1b4b7ecf4 Fix (nearly) all the std:: namespace violations in headers, in preparation for fixing SGsmplstat.hxx to *not* do a 'using namespace std'. 2011-10-17 17:41:59 +01:00
Torsten Dreyer
478e771632 Add a localizer audio ident class
This will be needed soon in the new navradio code.
2011-09-29 00:01:44 +02:00
Torsten Dreyer
0fa556d36a fix upper/lowercase typo
Just don't develop with windows. Never.
2011-09-15 22:39:47 +02:00
Torsten Dreyer
43109feb0c Some more refactoring of the radios
- wrap the ident-generating code into a class
- move dme-in-range property into dme.cxx
- move dme-ident generation into dme.cxx
- support ident-button and volume for dme idents
- use globals.get_aircraft_position instead of properties
- some minor cleanup
2011-09-15 21:28:30 +02:00
Torsten Dreyer
9cef27f5ca Refactor morse and beacon as singleton 2011-09-13 20:12:52 +02:00
ThorstenB
e9a9f8c96d Use some more logging class variety.
Stop using SG_GENERAL and SG_ALL everywhere. Using different
classes makes switching the classes really useful...
2011-08-12 00:09:26 +02:00
James Turner
6c52a5ac85 Fixes for include-file flattening - condition.hxx no longer pulls in props or props_io 2011-07-30 10:47:28 +01:00
James Turner
1c8d8e7908 More CMake headers support 2011-07-19 07:58:03 +01:00
ThorstenB
863551a932 fix #142: initial window position
Be (at least a bit) smarter with initial x/y position
Also some minor type/comment issues.
2011-05-29 18:46:11 +02:00
ThorstenB
b4c47b06d5 Drop unnecessary include dependency.
Make Csaba happy...
2011-03-23 22:50:56 +01:00
Erik Hofman
51a6302f48 Make sure Include/config.h gets found which is located in /src 2011-03-19 16:04:32 +01:00
ThorstenB
befc533398 More virtual destructors. 2011-03-19 15:02:17 +01:00
ThorstenB
4b74636d04 Avoid nuisance sound effects after sim-reset. 2011-03-19 14:51:39 +01:00
ThorstenB
badec14d27 Cut&paste voiceplayer into a separate module.
GPWS and TCAS are now completely separate - but use the same voice player.
2011-03-09 23:49:25 +01:00
Torsten Dreyer
1050a35d92 prepare for subsystem_mgr.hxx no longer including props.hxx
subsystem_mgr.hxx will soon no longer include props.hxx since it
does not (need to) know about properties at all.
2011-02-27 12:53:47 +01:00
James Turner
a91ec5f9f9 Initial work on CMake build files, with considerable help from Olaf Flebbe. 2010-12-19 15:06:04 +00:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
8330449c5f Pass current-dir into XMLSound
(and update to revised SGSoundSample ctor)
2010-09-06 09:28:28 +01:00
Frederic Bouvier
461b5fe00b Compile with MSVC10 2010-08-01 18:07:18 +02:00
James Turner
ab495d1370 Add --fg-aircraft option, and aircraft dir path list. Partial support in places that load files, for respecting the setting.
Add helper to look for an aircraft branch path in multiple candidate locations.
Update the main subsystems to use the helper, and hence load from any aircraft dir.
2010-07-28 22:03:10 +01:00