View Issue Details

IDProjectCategoryView StatusLast Update
0002624FSSCPsoundpublic2012-07-02 00:59
ReporterYarn Assigned Toiss_mneur  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.6.14 RC5 
Summary0002624: Sound does not pan correctly in cutscenes
DescriptionFor some reason, if a cutscene plays or the player changes view (e.g., by using the joystick hat), sounds are panned based on the camera's position and the player ship's heading. For example, if the player ship is facing forward but the camera is facing right, sounds will be panned as if the camera is facing forward.

This seems to happen regardless of the output device setting. Using the -no_3d_sound flag fixes it (but causes other positioning problems).
Steps To ReproduceThe attached mission demonstrates this problem. In it, the warp sound will play in each of these locations in order:

1) 200 meters in front
2) 1,000 meters in front
3) 200 meters to the right

This will happen four times with different camera and ship locations and headings:

1) Camera in ship, ship facing forward
2) Camera 800 meters behind ship, both camera and ship facing forward
3) Camera 800 meters behind ship and facing right, ship facing forward
4) Camera 800 meters behind ship and facing forward, ship facing right

The mission will tell you how the camera and ship are positioned as well as the proper panning and volume. If the sound is not panned correctly in current builds, the "panning" line will be red.
TagsNo tags attached.

Activities

Yarn

2012-03-06 03:19

developer  

PanTest.zip (1,923 bytes)

Yarn

2012-03-06 03:19

developer  

fs2_open.log (35,080 bytes)

iss_mneur

2012-05-10 06:50

developer   ~0013535

I can confirm this bug. freespace.cpp:4082 is the problem. The Listener location is set to the camera's position, but the player's speed and orientation.

iss_mneur

2012-05-12 20:52

developer   ~0013551

After reviewing the code. I think I may have misunderstood what the problem is.

Everything appears to be working as intended. I have attached an image that outlines the positions of the sounds as specified in the mission file. They are all being played as one would expect.

Yarn

2012-05-12 21:20

developer   ~0013552

Last edited: 2012-05-12 21:23

Are you sure it's working properly? When you play the mission, do the positions of the sounds match the text displayed in-mission?

When you test, make sure that you're *not* using the -no_3d_sound flag. Also be sure to listen with something that has good stereo separation, such as stereo headphones (not laptop speakers).

EDIT: In the image you posted, the 2's that are right of the ship should be 3's.

iss_mneur

2012-05-13 02:03

developer  

mantis-2624-layout.png (4,270 bytes)   
mantis-2624-layout.png (4,270 bytes)   

iss_mneur

2012-05-13 02:35

developer   ~0013553

[Fixed the image]

Okay. Seems I had -no_3d_sound enabled from testing previously.

So, it seems I was correct with what was causing this problem here. Please try the attached build.

On the topic of no_3d_sound issues, I don't know what you mean about the "other" positioning problems with no_3d_sound because it seems to be working fine (considering it just confused me). Please open another ticket describing it in more detail as I don't see any problems with it as it is right now.

iss_mneur

2012-05-13 02:38

developer   ~0013554

Hmm. Seems the build is too large. Build is here: https://www.box.com/s/1c16f1f65db752dcdc16

Yarn

2012-05-13 03:40

developer   ~0013555

Yay! Your build solved the problem.

As for the -no_3d_sound problem, dynamic panning* does not work when that flag is used. I believe the old sound code (from 3.6.12 and earlier) also behaved this way.


*I think this is the right term. I'm referring to sound effects being panned while they're played.

guest

2012-05-17 02:55

viewer   ~0013562

Fix committed to trunk@8788.

Zacam

2012-07-02 00:59

administrator   ~0013759

Fix committed to fs2_open_3_6_14@8934.

Related Changesets

fs2open: trunk r8788

2012-05-16 22:57

IssMneur


Ported: N/A

Details Diff
Fixes 0002624. The sound environment should now track the camera correctly. Affected Issues
0002624
mod - /trunk/fs2_open/code/freespace2/freespace.cpp Diff File

fs2open: fs2_open_3_6_14 r8934

2012-07-01 21:00

Zacam


Ported: N/A

Details Diff
Backport: Trunk r8788; Fixes 0002624. The sound environment should now track the camera correctly. Affected Issues
0002624
mod - /branches/fs2_open_3_6_14/code/freespace2/freespace.cpp Diff File

Issue History

Date Modified Username Field Change
2012-03-06 03:19 Yarn New Issue
2012-03-06 03:19 Yarn File Added: PanTest.zip
2012-03-06 03:19 Yarn File Added: fs2_open.log
2012-05-10 06:50 iss_mneur Note Added: 0013535
2012-05-10 06:50 iss_mneur Status new => confirmed
2012-05-12 20:15 iss_mneur File Added: mantis-2624-layout.png
2012-05-12 20:52 iss_mneur Note Added: 0013551
2012-05-12 20:52 iss_mneur Assigned To => iss_mneur
2012-05-12 20:52 iss_mneur Status confirmed => feedback
2012-05-12 21:20 Yarn Note Added: 0013552
2012-05-12 21:20 Yarn Status feedback => assigned
2012-05-12 21:23 Yarn Note Edited: 0013552
2012-05-13 02:03 iss_mneur File Deleted: mantis-2624-layout.png
2012-05-13 02:03 iss_mneur File Added: mantis-2624-layout.png
2012-05-13 02:35 iss_mneur Note Added: 0013553
2012-05-13 02:35 iss_mneur Status assigned => feedback
2012-05-13 02:38 iss_mneur Note Added: 0013554
2012-05-13 03:40 Yarn Note Added: 0013555
2012-05-13 03:40 Yarn Status feedback => assigned
2012-05-17 02:55 Changeset attached => fs2open trunk r8788
2012-05-17 02:55 guest Note Added: 0013562
2012-05-17 02:55 guest Status assigned => resolved
2012-05-17 02:55 guest Resolution open => fixed
2012-07-02 00:59 Zacam Changeset attached => fs2open fs2_open_3_6_14 r8934
2012-07-02 00:59 Zacam Note Added: 0013759