Author Topic: Sound set test builds  (Read 13414 times)

0 Members and 1 Guest are viewing this topic.

Offline m!m

  • 211
This has nothing to do with music.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Thanks for that. I'll probably make a request for such elsewhere.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Sound set test builds
I ran into what I think is a bug, kind of an odd case.

When assigning a turret rotation sound in ships.tbl, for example:

Code: [Select]
$Subsystem:                     gunturret-6, 25, 20
$Alt Subsystem Name: Heavy Turret
    $Default PBanks:            ( "VX-181 Heavy Pulse" "Type-3 Beehive round" )
$Turret Base RotationSnd: 321
$Target Priority:        ( "cruisers" "corvettes" "capitals" "super caps" "bombers" "fighters" )
$Flags: ( "check hull" "no subsystem targeting" "target requires fov" "fire on target" "salvo mode" "reset when idle" )
$animation: triggered
$type: initial
+relative_angle: 80, 0, 0 

And the sound its referencing is retail formatted, or uses the +Filename: formating
For example:
Code: [Select]
$Name: 321
+Filename: Turretrotation.ogg
+Preload: no
+Volume: 0.55
+3D Sound:
        +Attenuation start: 450
        +Attenuation end: 1500
+Priority: Medium-High
+Limit: 4

It will play just fine ingame.

However, when using the +Entry: format, the sound won't play.
This for example:
Code: [Select]
$Name: 321
+Entry: Turretrotation.ogg
+Cycle type: sequential
+Preload: no
+Volume: (0.85 0.90)
+3D Sound:
        +Attenuation start: 450
        +Attenuation end: 1500
+Priority: Medium-High
+Limit: 4
+Pitch: (0.95 1.05)
Won't work.
« Last Edit: March 13, 2018, 05:25:24 pm by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Sound set test builds
At a glance, it looks like volume/pitch ranges have issues with always returning 0 for min/max value, which could screw up a number of relevant pieces of code.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline m!m

  • 211
Re: Sound set test builds
The turret rotation sound code used the persistent object sound system so my first guess is that sound sets do not work well with that. I'll try to reproduce and fix this when I have some free time.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Sound set test builds
Not that this is a high priority issue or anything (I dont mean to come across as nagging), but has anyone looked into this yet?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline m!m

  • 211
Re: Sound set test builds
I built a test setup and I can reproduce the bug but at the moment I have no idea what might be causing this.

 

Offline m!m

  • 211
Re: Sound set test builds
I fixed the bug and opened a pull request for it: https://github.com/scp-fs2open/fs2open.github.com/pull/1671

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Sound set test builds
"I found the bug, but don't know how to fix it atm"
*30 minutes later*
"Fixed it"
 :lol: :yes:
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them