Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1223 closed enhancement (fixed)

[PATCH] Redesign Sound System

Reported by: Kieran P Owned by: stwf
Priority: Must Have Milestone: Alpha 11
Component: Core engine Keywords: patch
Cc: Patch:

Description (last modified by Kieran P)

Redesign the sound engine. Current one is broken and full of hacks.

  • During redesign, aim to solve the current issues, namely:
    • Current engine doesn't support Mac (#685, #931)
    • Music stops playing when returning to main menu (#946)
    • Suppress sound when minimized (#1218)
  • Further improve sound system (#961)
    • Sequential/random sounds
    • Fading sounds
    • Looping sounds

Attachments (5)

new_sound_manager_1.diff (75.5 KB ) - added by stwf 12 years ago.
patch12.diff (85.7 KB ) - added by stwf 12 years ago.
good_sounds.patch (194.5 KB ) - added by stwf 12 years ago.
most recent code version
RealPatch1.diff (200.0 KB ) - added by historic_bruno 12 years ago.
RealPatch2.diff (200.5 KB ) - added by stwf 12 years ago.
Latest sound manager fixes

Download all attachments as: .zip

Change History (25)

comment:1 by Kieran P, 12 years ago

Description: modified (diff)

comment:2 by Kieran P, 12 years ago

Description: modified (diff)

comment:3 by Kieran P, 12 years ago

Description: modified (diff)
Last edited 12 years ago by Kieran P (previous) (diff)

comment:4 by historic_bruno, 12 years ago

Old ticket: #138 Related: #685

comment:5 by stwf, 12 years ago

Owner: set to stwf
Status: newassigned

by stwf, 12 years ago

Attachment: new_sound_manager_1.diff added

comment:6 by stwf, 12 years ago

OK, this version builds on mac and linux

Fully supports the SoundGroup.xml as well as allowing for control of the Sound item from Javascript.

The missing feature is for position. It seems like the implementation of this merits some discussions on the forums.

Bugs carried over from the previous code include the playing of sounds that aren't on the screen and special intensity levels which also probably needs some discussion.

comment:7 by stwf, 12 years ago

Resolution: fixed
Status: assignedclosed

comment:8 by stwf, 12 years ago

Keywords: patch review added
Resolution: fixed
Status: closedreopened

comment:9 by stwf, 12 years ago

Keywords: sound, music patch review → sound, music, patch review
Resolution: fixed
Status: reopenedclosed
Summary: New Sound SystemNew Sound System [PATCH]

comment:10 by stwf, 12 years ago

Resolution: fixed
Status: closedreopened

comment:11 by Kieran P, 12 years ago

Keywords: music removed
Summary: New Sound System [PATCH][PATCH] New Sound System

comment:12 by Kieran P, 12 years ago

Description: modified (diff)
Summary: [PATCH] New Sound System[PATCH] Redesign Sound System

by stwf, 12 years ago

Attachment: patch12.diff added

comment:13 by stwf, 12 years ago

This patch contains the first pass of functionality for the new sound manager. All fields of the SoundGroup xml should be supported and directionality for on screen sounds includeed.

[PATCH REQUEST]

Last edited 12 years ago by stwf (previous) (diff)

comment:14 by stwf, 12 years ago

OK, new path. This fixes the issues with acknowledgements and some situations where the screen coordinates were not being correctly calculated. Also confirmed that sond gains are being applied correctly.

by stwf, 12 years ago

Attachment: good_sounds.patch added

most recent code version

in reply to:  14 comment:15 by historic_bruno, 12 years ago

Replying to stwf:

OK, new path. This fixes the issues with acknowledgements and some situations where the screen coordinates were not being correctly calculated. Also confirmed that sond gains are being applied correctly.

After applying the patch and resolving a few conflicts, I ran into these build errors:

10>..\..\..\source\soundmanager\CSoundManager.cpp(24): fatal error C1083: Cannot open include file: 'soundmanager/js/JSoundPlayer.h': No such file or directory

18>..\..\..\source\main.cpp(42): fatal error C1083: Cannot open include file: 'lib/res/sound/snd_mgr.h': No such file or directory

by historic_bruno, 12 years ago

Attachment: RealPatch1.diff added

by stwf, 12 years ago

Attachment: RealPatch2.diff added

Latest sound manager fixes

comment:16 by stwf, 12 years ago

THis version fixes some compiler warnings and guards against a segfault due to a missing resource, and now logs it. Loud music startup also addressed.

comment:17 by ben, 12 years ago

In 12428:

New sound system implementation by stwf, refs #1223, #961.
Enables audio on OS X, refs #685, #931.
Fixes music not playing after a game, refs #946.

comment:18 by Kieran P, 12 years ago

Keywords: review sound removed
Resolution: fixed
Status: reopenedclosed

comment:19 by ben, 12 years ago

In 12444:

Fixes unnecessary use of VfsPath pointers in sound system. Refs #1223

comment:20 by ben, 12 years ago

In 12459:

Updates bundled win32 OpenAL Soft to v1.14, seems to fix Windows crashes with new sound system. Refs #864, #1223

Note: See TracTickets for help on using tickets.