Opened 7 years ago

Closed 7 years ago

#10088 closed feature request (fixed)

TITANIC: Audio gap when music playback loops

Reported by: csnover Owned by: dreammaster
Priority: normal Component: Engine: Titanic
Version: Keywords:
Cc: Game: Starship Titanic

Description

Build: 6fac0ace2c844aa68c2482362021981ed1db931b + PR 975, macOS 10.11, SDL 2.0.5, ASan on

The looped background music has a small gap every time it loops. This is noticeable in the embarkation lobby and in whatever room is right after the embarkation lobby (so probably everywhere?).

Change History (5)

comment:1 by hamakei, 7 years ago

I think this behaviour is in the original, which would make it not a bug but an "aesthetic glitch"..something which would be nice to fix but isn't critical....

comment:2 by dreammaster, 7 years ago

Owner: set to dreammaster
Resolution: wontfix
Status: newclosed

I don't think it's feasible. The engine calls the CSound::updateMixer method every 10ms, which passes on to the waveMixPump method, which restarts any looping sound effects or music. So if there is any pause at the end of music, it's because it was part of the music itself. So it would only be possible by adding some very nasty hacks to restart specific music pieces just before they finish playback. Not worth it.

comment:3 by csnover, 7 years ago

What prevents you from using LoopingAudioStream to loop the stream instead of manually looping it in waveMixPump? I dumped the embarkation lobby audio and played it with an audio player, there is no gap in the audio data itself as far as I can tell so I don’t think there is any hack needed here?

comment:4 by dreammaster, 7 years ago

Resolution: wontfix
Status: closednew
Type: defectenhancement

That's actually a very good idea. I'm reopening the ticket as an enhancement, so I don't forget it.

comment:5 by dreammaster, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.