BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Sound] section in .animated files *for trains* not working

2 posters

Go down

[Sound] section in .animated files *for trains* not working Empty [Sound] section in .animated files *for trains* not working

Post by Tony515 Sat Apr 25, 2020 1:22 am

So I've been attempting to incorporate a [Sound] section in some of my .animated objects in 1.7.0.3 on Windows 10 update 1909 to give them their own sounds, and no matter how I set it up, whether it's a separate object, or included in another .animated object, the sound won't play in-game and there are no errors displayed in the log.txt file...


Last edited by Tony515 on Sat Apr 25, 2020 6:46 am; edited 1 time in total
Tony515
Tony515

Posts : 13
Join date : 2020-04-24
Location : New York City, USA

https://www.youtube.com/channel/UCfV997Q6rT3AKS1Xom936Ew

Back to top Go down

[Sound] section in .animated files *for trains* not working Empty Re: [Sound] section in .animated files *for trains* not working

Post by S520 Sat Apr 25, 2020 4:12 am

The problem you have found is similar to the one below.
https://bveworldwide.forumotion.com/t1872-animated-sound

First, try the latest version of nightly build.
http://vps.bvecornwall.co.uk/OpenBVE/Builds/

If it still doesn't work, show us the code in the .animated file that doesn't work.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

[Sound] section in .animated files *for trains* not working Empty Re: [Sound] section in .animated files *for trains* not working

Post by Tony515 Sat Apr 25, 2020 5:50 am

Code:
[Object]
States = ExceptionCode.b3d
TrackFollowerFunction = mod[speed * 2.23694,2]

[Sound]
Filename = motor0.wav
Volume = 1.0
Pitch = 1.0
VolumeFunction = 1.0
PitchFunction = 1.0
Position = 0,0,0
Radius = 5

This is the code I'm using for the sample object. I don't believe that this is the same issue that you mentioned, this seems to be different. Once again, log.txt shows no errors with it, and Object Viewer refuses to open this object entirely.
Tony515
Tony515

Posts : 13
Join date : 2020-04-24
Location : New York City, USA

https://www.youtube.com/channel/UCfV997Q6rT3AKS1Xom936Ew

Back to top Go down

[Sound] section in .animated files *for trains* not working Empty Re: [Sound] section in .animated files *for trains* not working

Post by S520 Sat Apr 25, 2020 6:22 am

I tried your code with latest nightly build.
I was able to hear the audio.

Therefore, check the following points:

  • Is the camera near the location of the sound object? (The location specified by Track.FreeObj)
  • Is Radius big enough? (If Radius is small, you cannot hear the sound from a distance)
  • Is the volume of the sound file appropriate?

Also, Object Viewer does not support sound playback.
S520
S520

Posts : 113
Join date : 2018-08-24
Location : Japan

https://github.com/s520

Back to top Go down

[Sound] section in .animated files *for trains* not working Empty Re: [Sound] section in .animated files *for trains* not working

Post by Tony515 Sat Apr 25, 2020 6:39 am

S520 wrote:I tried your code with latest nightly build.
I was able to hear the audio.

Therefore, check the following points:

  • Is the camera near the location of the sound object? (The location specified by Track.FreeObj)
  • Is Radius big enough? (If Radius is small, you cannot hear the sound from a distance)
  • Is the volume of the sound file appropriate?

Also, Object Viewer does not support sound playback.

I understand the issue now, it appears that the [Sound] section does not have support on trains. I was using the sound with a train, and as the object is required to be a free object on the route, I can't use it with a train. I guess this is a suggestion for future builds: can support for [Sound] be added on trains?
(This can be continued here: https://bveworldwide.forumotion.com/t1793-animated-objects-with-sound)
Tony515
Tony515

Posts : 13
Join date : 2020-04-24
Location : New York City, USA

https://www.youtube.com/channel/UCfV997Q6rT3AKS1Xom936Ew

Back to top Go down

[Sound] section in .animated files *for trains* not working Empty Re: [Sound] section in .animated files *for trains* not working

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum