Re: [Flightgear-devel] no doppler sound with actual build

2007-06-26 Thread Melchior FRANZ
* Erik Hofman -- Tuesday 26 June 2007:
 Since it seems to be a Windows problem it's not a matter of depending on 
 a svn build or not.

Im must say, though, that my reluctance to commit that was based
on the assumption that Doppler is really only functional in fg/osg,
but not fg/plib. There's no release imminent for fg/osg, and we
have time to clear matters and don't need to rush in a workaround
for a (potentially) long fixed bug.

But yesterday things changed. After committing a two-liner patch
Doppler works now in fg/plib, too. Just not on (all versions of?)
MS Windows. And for fg/plib there *is* a release to be expected
soon (although Curt adheres to the old fgfs tradition to let us
unclear about the timeframe :-). In this case it's probably a
good idea to commit the patch. Fly-By View profits a lot of it.
Cleanliness of code is less of a concern here -- 0.9.11 will be
the last release made from the plib branch. Better a good release,
than clean *but* *dead* code in the repository.  ;-)

m.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] crash in AI traffic

2007-06-26 Thread Durk Talsma
On Tuesday 26 June 2007 03:09, Csaba Halász wrote:
 Hi!

 Helijah has run into a crash. Gdb backtrace here:
 http://pastebin.ca/589461 (no debug symbols unfortunately)

 Looks like the next waypoint is null.
 As a quick and dirty fix I came up with this:

 Index: src/AIModel/AIAircraft.cxx
 ===
 RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIAircraft.cxx,v
 retrieving revision 1.65
 diff -u -r1.65 AIAircraft.cxx
 --- src/AIModel/AIAircraft.cxx  16 Jun 2007 05:38:05 -  1.65
 +++ src/AIModel/AIAircraft.cxx  26 Jun 2007 01:07:16 -
 @@ -747,7 +747,7 @@

  if (fabs(speed_diff)  10) {
  prevSpeed = speed;
 -fp-setLeadDistance(speed, tgt_heading, curr, next);
 +if (next) fp-setLeadDistance(speed, tgt_heading, curr, next);
  }
  }


 This is probably not the right way to fix it, somebody please have a look.

 Thanks,
 Csaba


Hi Csaba,

Thanks for reporting. I'll have a look. Can you give me some specifics as to 
the conditions under which the crash appears? Which airport, or vincity? 
Traffic Manager or scripted AI? Thanks in advance!

Cheers,
Durk

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Doppler oddness

2007-06-26 Thread Jon Stockill
With a cvs build checked out about half an hour ago I've just noticed 
something very strange - with external views the doppler shift appears 
to be related to the view angle rather than the approach speed. If you 
select the chase view then you'll find that the sound is extremely slow 
from behind the aircraft, and ridiculously fast from in front. This also 
still seems to affect the radio chatter, resulting in some highly 
comical, but not too realistic radio messages.

Jon

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] crash in AI traffic

2007-06-26 Thread Csaba Halász
On 6/26/07, Durk Talsma [EMAIL PROTECTED] wrote:
 On Tuesday 26 June 2007 03:09, Csaba Halász wrote:
  Hi!
 
  Helijah has run into a crash. Gdb backtrace here:
  http://pastebin.ca/589461 (no debug symbols unfortunately)

 Thanks for reporting. I'll have a look. Can you give me some specifics as to
 the conditions under which the crash appears? Which airport, or vincity?
 Traffic Manager or scripted AI? Thanks in advance!

It was Helijah who experienced the crash, I can't give you many more details.
The airport was KSFO. Seems to always occur after a couple of minutes.

-- 
Csaba

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Doppler oddness

2007-06-26 Thread Maik Justus

Hi Jon,

thanks for pointing that out. And thanks to you and AJ for the debugging 
on IRC.
Here is a patch (the same you already got via EMail (ok, one debug 
message is different)), which could fix it. If the bug is still present, 
please comment out line 56 (#define USE_OPEN_AL_DOPPLER should work) in 
file simgear\sound\sample_openal.hxx to use the own calculations.

This patch has some debug code and is not intended to go into cvs.
Due to pitch-limits on older OpenAL versions I am thinking of a patch 
for these versions. The pitch limitation on old OpenAL versions limit 
the Doppler effect depending on the pitch value without Doppler effect, 
which could sound odd on some aircrafts. But I only will start to work 
on that patch if there is a chance to get it into cvs. Therefore I will 
wait, if the windows patch will be accepted.
(It could be, that you get warnings about pitch values  2. Even some 
OpenAL1.1 versions seem to be limited in pitch while the OpenAL1.1 
specification says they aren't)


Maik


Jon Stockill schrieb am 26.06.2007 21:06:
With a cvs build checked out about half an hour ago I've just noticed 
something very strange - with external views the doppler shift appears 
to be related to the view angle rather than the approach speed. If you 
select the chase view then you'll find that the sound is extremely slow 
from behind the aircraft, and ridiculously fast from in front. This also 
still seems to affect the radio chatter, resulting in some highly 
comical, but not too realistic radio messages.


Jon

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

  


Index: sound/sample_openal.cxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/sound/sample_openal.cxx,v
retrieving revision 1.27
diff -u -p -r1.27 sample_openal.cxx
--- sound/sample_openal.cxx 21 Jun 2007 21:46:21 -  1.27
+++ sound/sample_openal.cxx 26 Jun 2007 21:57:20 -
@@ -75,12 +75,17 @@ SGSoundSample::SGSoundSample() :
 reference_dist(500.0),
 max_dist(3000.),
 loop(AL_FALSE),
-playing(false)
+#ifndef USE_OPEN_AL_DOPPLER
+doppler_pitch_factor(1),
+doppler_volume_factor(1),
+#endif
+playing(false),
+no_Doppler_effect(true)
 {
 }
 
 // constructor
-SGSoundSample::SGSoundSample( const char *path, const char *file) :
+SGSoundSample::SGSoundSample( const char *path, const char *file , bool 
_no_Doppler_effect ) :
 buffer(0),
 source(0),
 pitch(1.0),
@@ -88,7 +93,12 @@ SGSoundSample::SGSoundSample( const char
 reference_dist(500.0),
 max_dist(3000.),
 loop(AL_FALSE),
-playing(false)
+#ifndef USE_OPEN_AL_DOPPLER
+doppler_pitch_factor(1),
+doppler_volume_factor(1),
+#endif
+playing(false),
+no_Doppler_effect(_no_Doppler_effect)
 {
 SGPath samplepath( path );
 if ( strlen(file) ) {
@@ -145,7 +155,7 @@ SGSoundSample::SGSoundSample( const char
 }
 
 // constructor
-SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) :
+SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq , bool 
_no_Doppler_effect ) :
 buffer(0),
 source(0),
 pitch(1.0),
@@ -153,7 +163,12 @@ SGSoundSample::SGSoundSample( unsigned c
 reference_dist(500.0),
 max_dist(3000.),
 loop(AL_FALSE),
-playing(false)
+#ifndef USE_OPEN_AL_DOPPLER
+doppler_pitch_factor(1),
+doppler_volume_factor(1),
+#endif
+playing(false),
+no_Doppler_effect(_no_Doppler_effect)
 {
 SG_LOG( SG_GENERAL, SG_DEBUG, In memory sounds sample );
 
@@ -254,7 +269,9 @@ SGSoundSample::bind_source() {
 alSourcef( source, AL_CONE_INNER_ANGLE, inner );
 alSourcef( source, AL_CONE_OUTER_ANGLE, outer );
 alSourcef( source, AL_CONE_OUTER_GAIN, outergain);
+#ifdef USE_OPEN_AL_DOPPLER
 alSourcefv( source, AL_VELOCITY, source_vel );
+#endif
 alSourcei( source, AL_LOOPING, loop );
 
 alSourcei( source, AL_SOURCE_RELATIVE, AL_TRUE );
@@ -273,8 +290,22 @@ SGSoundSample::set_pitch( double p ) {
 if ( p  2.0 ) { p = 2.0; }
 pitch = p;
 if (playing) {
+#ifdef USE_OPEN_AL_DOPPLER
 alSourcef( source, AL_PITCH, pitch );
-print_openal_error(set_pitch);
+#else
+ #ifdef AL_VERSION_1_1
+alSourcef( source, AL_PITCH, pitch * doppler_pitch_factor );
+ #else
+p*=doppler_pitch_factor;
+if ( p  0.01 ) { p = 0.01; }
+if ( p  2.0 ) { p = 2.0; }
+alSourcef( source, AL_PITCH, p );
+ #endif
+#endif
+//print_openal_error(set_pitch);
+char t[256];
+sprintf(t,set_pitch: 

Re: [Flightgear-devel] Doppler oddness

2007-06-26 Thread Martin Spott
Maik Justus wrote:

 [...] But I only will start to work 
 on that patch if there is a chance to get it into cvs. Therefore I will 
 wait, if the windows patch will be accepted.

The original author of the OpenAL publicly objects implementing things
in FlightGear that OpenAL usually should take care of and apparently
the issue with OpenAL is still open.
How do you _dare_ to expect people to commit your windows patch !?
Such behaviour is highly disrespectful. Please comply with the same
measures of fairness that you expect from other people (on this list)
and refrain from such attempts unless the OpenAL issue is closed.

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Doppler oddness

2007-06-26 Thread SydSandy
On Tue, 26 Jun 2007 23:14:08 + (UTC)
Martin Spott [EMAIL PROTECTED] wrote:

 Maik Justus wrote:
 
  [...] But I only will start to work 
  on that patch if there is a chance to get it into cvs. Therefore I will 
  wait, if the windows patch will be accepted.
 
 The original author of the OpenAL publicly objects implementing things
 in FlightGear that OpenAL usually should take care of and apparently
 the issue with OpenAL is still open.

So  the problem is being dealt with then ???

 How do you _dare_ to expect people to commit your windows patch !?
 Such behaviour is highly disrespectful. Please comply with the same
 measures of fairness that you expect from other people (on this list)
 and refrain from such attempts unless the OpenAL issue is closed.

This kind of answer is highly disrespectful too , considering the amount of 
work Maik has done to improve Flightgear! 

-- 
SydSandy [EMAIL PROTECTED]

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] APIENTRY Compilation Problem

2007-06-26 Thread Hans Fugal
Hello,

On OS X 0.9.11-pre1 works fine. I've begun trying to get the OSG
version to compile now, and I've run up against this problem, which
has been discussed before. I'm going to try to explain the problem in
terms that I feel would have helped me get to the bottom of
understanding the problem sooner, for posterity's sake. Maybe some
problem-solving discussion will also come of it.

When compiling ATC/atis.cxx I get errors like the following:

/Library/Frameworks/osg.framework/Headers/BufferObject:181: error:
expected `)' before '*' token

Line 181 in the BufferObject header is

typedef void (APIENTRY * GenBuffersProc) (GLsizei n, GLuint *buffers);

If you define APIENTRY in config.h or some other generic place, either
in flightgear or simgear, you will still find that APIENTRY is
undefined at this point, because Apple's GLUT/glut.h (located at
/System/Library/Frameworks/GLUT.framework/Versions/A/Headers/glut.h on
my system) has the following code at the beginning:

/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
#if !defined(_WIN32)
#define APIENTRY
#define GLUT_APIENTRY_DEFINED
#define CALLBACK
#endif

and the following code at the end:

#ifdef GLUT_APIENTRY_DEFINED
# undef GLUT_APIENTRY_DEFINED
# undef APIENTRY
#endif

Now, the obvious problem here is that regardless of whether APIENTRY
was defined upon entering this file, it will be undefined upon leaving
it. I believe the following patch to glut.h is the correct fix:

--- /tmp/glut.h 2007-06-26 17:51:02.0 -0600
+++ /System/Library/Frameworks/GLUT.framework/Headers/glut.h
2007-06-26 17:56:46.0 -0600
@@ -65,8 +65,10 @@

 /* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
 #if !defined(_WIN32)
-#define APIENTRY
-#define GLUT_APIENTRY_DEFINED
+#ifndef APIENTRY
+# define APIENTRY
+# define GLUT_APIENTRY_DEFINED
+#endif
 #define CALLBACK
 #endif

However, this is of course not our playing field. When I patch my
glut.h like that, atis.cxx compiles fine.

glut.h is being included by plib/pu.h, which is included in 16 places
in FlightGear (none in SimGear), so if we intelligently redefined
APIENTRY after each of those includes (being careful not to define it
to nil on Windows) that might be something we could do directly. Or
perhaps better, create a wrapper header for pu.h that does that in one
place, so we avoid repeating ourselves.

In simgear/math/SGMath.hxx we have the following:

#include osg/GL
#undef GLUT_APIENTRY_DEFINED // GL/glut.h undef APIENTRY when this
symbol is defi
ned. osg/GL defines it (?).
 // This probably would work if we didn't
use plib/pu
.h that include GL/glut.h
 //  on its side.

osg/GL does define GLUT_APIENTRY_DEFINED, but only on Windows. In any
case, the problem is not that GLUT_APIENTRY_DEFINED is set upon
entering glut.h, because glut.h sets it all by itself. So that undef
could probably be removed.

Freeglut does not seem to be so afflicted, which is why it works on
linux for most people.

It would be prudent to report the bug in GLUT to GLUT and your
system's maintainers if you use a system with real GLUT (e.g. report
to apple on OS X).

I'm hoping this message has provided enough information for
individuals to work around the problem, and for us to find a solution
to work around GLUT's deficiency while we wait with bated breath for
them to fix it (ha).

-- 
Hans Fugal
Fugal Computing

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] OpenGL restored after two years.

2007-06-26 Thread Jon S. Berndt
Amazingly, I seem to have restored hardware accelerated OpenGL capabilities
to my system after two years (?). A chance encounter with a five year old
posting about a beta driver from VIA seems to have restored the capability.
This came from the readme file with the driver:

--- start ---

It closes the RX55 memory register in BIOS. The RX55 register's official
name and function is Memory Write Queue (MWQ) timer. The MWQ timer is
actually a timing device included in the memory host controller to prevent
write data being held in the memory queue too long. After the data has been
in the queue too long it times out. This timed out data is then given a
higher write request priority. Now that might sound nice - a bit of extra
performance BUT the procedure fails when overloaded. 3D games and Win XP put
too much load on the memory queuing timer procedure. The nVidia new driver
exaggerates the problem even more as the driver enables nVidia cards to use
even more memory than previous driver versions. 

So in a nutshell it's a memory timing problem that only happens when the
RX55 register is opened. Some motherboard manufacturers have already
released new BIOS that have the register closed. In other instances, this
patch is needed.

--- start ---

So, I'll be able to run FlightGear again for the first time in two years, as
well. This OpenGL driver issue has been quite an irritant.

Jon



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Open Source Awards

2007-06-26 Thread Jon S. Berndt
SourceForge is accepting nominations for the Community Choice Awards. There
are several projects involved with this flight sim community that could be
nominated, and I encourage you to consider nominating packages you feel
deserve it.

You can find the projects that are related to flightgear here:

http://sourceforge.net/search/?type_of_search=softwords=flightgear

On the project page there is a an image button that you can click on to
nominate projects.

Jon




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel