On Tue, Oct 27, 2009 at 1:23 PM, Erik Hofman <e...@ehofman.com> wrote:
>
> This is getting silly. I've now committed code that checks is the source
> and listener are further apart than 50km or if there are any NaN's in
> the position, orientation or velocity data of the source or listener.
> If the sound is still inaudible while FlightGear prints a warning in the
> sort of "NaN detected in position" or "source and listener distance
> greater than 50km" then I'm really going to suspect a bug in the OpenAL
> implementation.

Starting at EGLL with the default c172p, I notice:
1) the engine sound is louder in cockpit than in external view
2) tuning to ATIS 123.9 I get the "source and listener distance
greater than 50km!" message (twice)
3) tuning away from ATIS frequency does not stop ATIS sound

About item #3: lines 267-8 in ATC.cxx:
    _sgr->stop(refname);
    _sgr->remove(refname);
stop() only sets a flag that is checked in SGSampleGroup::update.
However, remove() removes the sample immediately from the _samples
collection and puts it into the _removed_samples. From there, only
sounds that are really stopped (OpenAl-wise) get cleaned up. Except
the update() never gets a chance to stop the sample because it is
already removed from the active collection. (ATIS is not the only
example for this)

Looking at the code I spotted that FGATC::_playing isn't initialized
in the constructor, please fix it if you have a spare moment. Also,
generating random refname for sound samples but then using a different
refname to add it into the _samples collection is confusing. I mean,
It sure confused me, I thought I was seeing memory corruption and
started to hunt it down :)

-- 
Csaba/Jester

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to