|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002624||FSSCP||sound||public||2012-03-05 22:19||2012-07-01 20:59|
|Platform||x64||OS||Windows 7||OS Version|
|Product Version||3.6.14 RC5|
|Target Version||Fixed in Version|
|Summary||0002624: Sound does not pan correctly in cutscenes|
|Description||For 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 Reproduce||The 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.
|Tags||No tags attached.|
|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.|
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.
Last edited: 2012-05-12 17: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.
[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.
|Hmm. Seems the build is too large. Build is here: https://www.box.com/s/1c16f1f65db752dcdc16|
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.
|Fix committed to trunk@8788.|
|Fix committed to fs2_open_3_6_14@8934.|
fs2open: trunk r8788
Timestamp: 2012-05-16 22:57:33
|Fixes 0002624. The sound environment should now track the camera correctly.|
|mod - /trunk/fs2_open/code/freespace2/freespace.cpp|
fs2open: fs2_open_3_6_14 r8934
Timestamp: 2012-07-01 21:00:31
|Backport: Trunk r8788; Fixes 0002624. The sound environment should now track the camera correctly.|
|mod - /branches/fs2_open_3_6_14/code/freespace2/freespace.cpp|
|2012-03-05 22:19||Yarn||New Issue|
|2012-03-05 22:19||Yarn||File Added: PanTest.zip|
|2012-03-05 22:19||Yarn||File Added: fs2_open.log|
|2012-05-10 02:50||iss_mneur||Note Added: 0013535|
|2012-05-10 02:50||iss_mneur||Status||new => confirmed|
|2012-05-12 16:15||iss_mneur||File Added: mantis-2624-layout.png|
|2012-05-12 16:52||iss_mneur||Note Added: 0013551|
|2012-05-12 16:52||iss_mneur||Assigned To||=> iss_mneur|
|2012-05-12 16:52||iss_mneur||Status||confirmed => feedback|
|2012-05-12 17:20||Yarn||Note Added: 0013552|
|2012-05-12 17:20||Yarn||Status||feedback => assigned|
|2012-05-12 17:23||Yarn||Note Edited: 0013552||View Revisions|
|2012-05-12 22:03||iss_mneur||File Deleted: mantis-2624-layout.png|
|2012-05-12 22:03||iss_mneur||File Added: mantis-2624-layout.png|
|2012-05-12 22:35||iss_mneur||Note Added: 0013553|
|2012-05-12 22:35||iss_mneur||Status||assigned => feedback|
|2012-05-12 22:38||iss_mneur||Note Added: 0013554|
|2012-05-12 23:40||Yarn||Note Added: 0013555|
|2012-05-12 23:40||Yarn||Status||feedback => assigned|
|2012-05-16 22:55||Changeset attached||=> fs2open trunk r8788|
|2012-05-16 22:55||guest||Note Added: 0013562|
|2012-05-16 22:55||guest||Status||assigned => resolved|
|2012-05-16 22:55||guest||Resolution||open => fixed|
|2012-07-01 20:59||Zacam||Changeset attached||=> fs2open fs2_open_3_6_14 r8934|
|2012-07-01 20:59||Zacam||Note Added: 0013759|