Elvas Tower: AI train horn blow - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 5 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

AI train horn blow Rate Topic: -----

#31 User is offline   Matt1983 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 9
  • Joined: 16-June 14
  • Simulator:Open Rails
  • Country:

Posted 15 April 2015 - 10:56 AM

Here in Argentina, all trains (diesel) honk before leaving

https://www.youtube....h?v=l5rpo_BgHow
https://www.youtube....h?v=vKRsLurPzSA
https://www.youtube....h?v=FPGCxhT9H7E
https://www.youtube....h?v=Hh9fhM7OagA

In the United States, many passenger trains activate the bell to depart.

#32 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 03 June 2015 - 05:34 AM

Here in India, trains are required to sound 1 long blast of High-tone horn followed by 1 short blasts of Low-tone. At level crossings there are no particular rules but sign boards are placed 250m before the LC and pilots honk to there hearts content..... :rolleyes: :pardon:

#33 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 20 January 2016 - 12:46 AM

View PostCsantucci, on 13 April 2015 - 11:55 PM, said:

AI horn blowing will stay as it is in Release 1.0, as feature changes are frozen now. However I have the intention of inserting further new features after OR evolution restarts:
- horn blast heard at higher distances (with the help of Peter (gpz) I hope)
- configurable maximum distance at which blast starts
- optional North-American blast sequence, including horn still playing when passing crossing.

Carlo, I have thought of a different strategy of OpenAL sound source management, than we are doing today. The original (current) code assigns an OpenAL source to every sound source getting into cutoff distance circle automatically. I think, this is a waste of resources, since quite a few of them are actually playing, most of them are just sitting in the memory waiting for play. Instead, a better way would be to actually assign an OpenAL source only to sounds wanting to play, and revoking it from them once they have stopped. The buffers are still sitting in memory, so it wouldn't cause more disk reads than now, just we could drastically reduce the number of utilized OpenAL sound sources, which is the current limit of increasing the cutoff distance. This way the cutoff distance could be increased maybe upto 1.5-2 km, from the current 400 m.

If I published a patched branch, wouldn't you mind testing it at one of your sound-crowded locations?

#34 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 20 January 2016 - 05:27 AM

Hi Peter,
Yes, I can test it.

#35 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 20 January 2016 - 10:29 AM

I'm sorry for the delay, here is the git branch with modified behavior: https://github.com/p.../SoundSourceIDs

I increased the cutoff distance to 2 km, so horn blast can be heard from much higher distance.

I have also modified the Sound Debug Form to show the actual number of utilized sound sources. I have done the modifications with two different commits, so you may checkout the HEAD's preceeding commit to see the same number in Sound Debug Form before the modifications.

#36 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 21 January 2016 - 01:39 AM

Hi Peter, I have downloaded your latest commit and will test it. As I am not expert at all in GitHub, can you tell me how to access your preceding commit? (The one where you only inserted the display of the number of sound sources used in the Sound Debug Form).

#37 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 21 January 2016 - 02:09 AM

First impressionis that this seems to be a great improvement on sound. Hearing horn up to 2 Km is impressive.
However I found a problem: I have some trainsets where the bell trigger is used as a second type of horn, e.g. like here:
			Stream (
				Volume ( 1.25 )
				Skip (Stream14 **** This stream allows the whistle to be played at the same time  	**** )
				Priority ( 6 )
				Triggers ( 1
					Discrete_Trigger ( 10	PlayOneShot ( 2
													File ( "Fischio_corto.wav" -1 )	
													File ( "Fischio_doppio_11.wav" -1 )	
													SelectionMethod ( RandomSelection ))) 
				)
			)


Well, this sound (in this case it's within a cab sound .sms file) isn't heard with your version, while it's heard both with OR 1.0 and OR x.3415.
Testing continues.

#38 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 21 January 2016 - 03:30 AM

Probably an ID assignment is missing from somewhere, I will test it out. (I have ideas. :) ) In the end I would be curious about the max number of sources utilized in an area with many-many sounds. I'm curious about it, because if we could go below 256 with the needed number of sources, there would be no need for the custom-compiled oal-soft.dll, a pre-compiled version could be enough (e.g. the one that comes as a nuget package), and the source package could be removed from our repository.

#39 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 21 January 2016 - 04:29 AM

There was a fixed 400m cutoff? I didn't knew that, however the most of the sound activation distances are set to too high in sms files already. How the CPU usage of sound process looks, with this new OpenAL handling?

#40 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 21 January 2016 - 04:43 AM

View Postdisc, on 21 January 2016 - 04:29 AM, said:

There was a fixed 400m cutoff? I didn't knew that, however the most of the sound activation distances are set to too high in sms files already. How the CPU usage of sound process looks, with this new OpenAL handling?

You can answer your own question about CPU usage, if you compile the branch on your computer. :)

  • 5 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users