Volume of stereo cabview sounds much louder than mono ones (since #1604)

Bug #1193823 reported by BB25187
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Medium
Peter Gulyas

Bug Description

In a recent topic, I evoked some strange effects when using mono-channel cab sounds. I tried to build a simple test bed to expose this point. This appears to be less straightforward than I expected. But on the way, I found a far more obvious "issue": it relates with the volume of mono-channel versus stereo-channel sounds.
- Before revision #1604 (and with MSTS), using a stereo or mono sound in a cabview SMS resulted in a comparable volume (assuming that the stereo and mono WAV files are "normalized", and that the volume declared in the SMS file are the same).
- Since revision #1604, the volume we get with a stereo sound file is much louder than the volume we get with the equivalent mono sound file.
This results in a very different balancing of the cab sound and "environmental" sounds (track, AI trains, crossings, ... ).
I build a specific Kiha-based diesel engine to reproduce. It contains two engine files and accompanying SMS and WAV files: the first engine file makes use of a single stream stereo cab sound. The second one makes use of the equivalent mono sound. Running the same activity with either of the two vehicles exposes the issue.
I tested again with latest revisions (#1660) and this is still to be observed.

The test bed can be downloaded at the following URL:
http://download.activitysimulatorworld.net/asw/Chargements_Temporaires/OR_Reports/_OR_DieselLoc_MonoSoundCab_.zip

Note that this could be one of the causes of bug #1193320.

Related topic on the forum: http://www.elvastower.com/forums/index.php?/topic/22061-volume-of-sounds-mono-versus-stereo-since-1604/page__p__123493__hl__stereo__fromsearch__1#entry123493

Tags: sounds
James Ross (twpol)
tags: added: sounds
Changed in or:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 1.0
Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Thank you for your repeatedly perfect test bed! (And sorry for not coming to fix it till now, though you have already indicated it on ET forum.) The issue is now fixed in r1662.

Changed in or:
assignee: nobody → Peter Gulyas (pzgulyas)
status: Triaged → Fix Committed
Revision history for this message
Edward Keenan (edwardk) wrote :

Peter,

Check your fix. I believe your fix may have stopped all sound. I started from V1660 and applied your fix and no sound.

Edward K.

Revision history for this message
Edward Keenan (edwardk) wrote :

Peter,

Check your fix at line 433 in the Sound.cs file. I kept your first fix at line 390 and reversed the fix at line 433 and the sounds work.
Nothing has been submitted, I am just informing you.

Edward K.

Peter Gulyas (pzgulyas)
Changed in or:
status: Fix Committed → In Progress
Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Edward,

What are the circumstances you have no sounds at all? I have tried many routes including all the standard ones without being able to reproduce this muting.

Revision history for this message
BB25187 (bb25187) wrote :

Hi Peter,

I just tested revision #1663, and this is much better now. Thanks for the fix! I will make further tests during the next week-end to verify if this also resolves the weird interactions between track and cab sounds.
I could not observe the mute sounds either.

Regards

Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Meanwhile I was suggested a test case of a muted sound by "Disc" forum member. I will commit a new patch soon based on a different strategy for testing for cab sound.

Revision history for this message
BB25187 (bb25187) wrote :

Oops, I confirm that sounds are all muted in some cases: player trains, traffic trains and environment sounds are impacted. I could not understand which specific situation may expose the problem.
Something interesting:
- this is not systematic: sound may work on some routes / with some vehicles
- when sounds are muted, the sound process does not consume any CPU (0%).

Revision history for this message
Peter Gulyas (pzgulyas) wrote :

I hope now it is really fixed in r1665. :)

Changed in or:
status: In Progress → Fix Committed
Revision history for this message
BB25187 (bb25187) wrote :

Seems so! I just retried with the same route and activity which exposes muted sounds, and it now works pretty well.
Furthermore, this was also one of the routes on which I got the weird effects with track/cabview sounds: it seems that sounds are clean now, after the fix you made for mono channel WAV files.
Great thanks for your reactivity!

Revision history for this message
Edward Keenan (edwardk) wrote :

Peter,

Currently running V1665 and the sound issue has been fixed. Apparently the symptom of the issue was different from one person to the next. In my case, I had no sound at all. Both in cab and out of cab.

Edward K.

James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.