Paul Surgeon wrote:
On Saturday, 26 February 2005 10:51, Erik Hofman wrote:

The annoying click is because the audio file is not edited correctly.

Also, you are aware that a sound played with a pitch offset of 1.0 is
played twice the original speed (pitch always start at 1.0).

I just checked this and a pitch offset of 1.0 definately reproduces the original speed.
I don't have a frequency analyser available but my ears aren't that bad. :)
With an offset of 0.5 the frequency is definately about half of the original pitch.

Yes, looking at the code I see you are correct.


Negative values for the properties should be no problem at all.


They certainly are!  :)
I just did a bug test.

Here is the config :

  <audiocue>
    <name>sinkcue</name>
    <mode>looped</mode>
    <path>Aircraft/LAK-19/Instruments/ILEC_SC-7/sink-tone.wav</path>
    
<property>/instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>
    <volume>
      <min>0.3</min>
      <max>0.3</max>
    </volume>
    <pitch>
      
<property>/instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>
      <factor>0.001</factor>
      <offset>1.0</offset>
    </pitch>
  </audiocue>

For positive values the tone increases.
For negative values the tone just loops with no pitch change.

There is one special condition, <min> is set to 0.0 as it's lowest value, so the only reason pitch can be clamped at the lower end is because it is really < 0.0.

It's definately broken but this is one of those bugs that has not popped up in the past because no one has tried driving the pitch with a negative value yet. :)

There is nothing special about using negative values for calculating the pitch pitch so it should have showed up earlier if something was broken.


Erik

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to