Opened 21 years ago

Closed 20 years ago

Last modified 6 years ago

#8304 closed patch

SWORD2: Compressing speech / music (incomplete)

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: Sword2
Version: Keywords:
Cc: Game: Broken Sword 2

Description

This patch represents one half of supporting compressed speech and music in Broken Sword II. Specifically, it's a tool for compressing the data. No playback yet.

Obviously, I haven't been able to test this. I'm submitting it just so that others will have a better start if they want to do any work on it.

Ticket imported from: #854561. Ticket imported from: patches/409.

Attachments (1)

bs2_comp_tools.diff (11.5 KB ) - added by eriktorbjorn 20 years ago.
Patch against an August 15 CVS snapshot

Download all attachments as: .zip

Change History (7)

comment:1 by fingolfin, 21 years ago

So, where's the problem with adding playback support, exactly?

comment:2 by eriktorbjorn, 21 years ago

Mostly me not knowing the sound code well enough yet. :-)

I do have some ideas how to do it, but I'm not going to cry myself to sleep if someone else does it before I get around to it.

by eriktorbjorn, 20 years ago

Attachment: bs2_comp_tools.diff added

Patch against an August 15 CVS snapshot

comment:3 by eriktorbjorn, 20 years ago

I'm attaching an updated patch, and I'm about to commit some experimental code for playing compressed speech in BS2. I don't want to apply this patch yet though, because although MP3 compression seems to work, Vorbis doesn't - I get "Corrupted data in Vorbis file" on several sounds, including a few in the intro cutscene.

(FLAC is even worse. Every sound I've tried to play back gets truncated. On the other hand, I'm considering disabling FLAC completely, since the file it creates is likely to be larger than the original!)

I don't know yet if the error is in the compression tool, or if it's in the playback code. Or both.

comment:4 by eriktorbjorn, 20 years ago

Owner: set to eriktorbjorn
Status: newclosed

comment:5 by eriktorbjorn, 20 years ago

I think I've figured out what was causing problems with Vorbis and FLAC and which, by rights, ought to have caused problems with MP3 as well. I've comitted an updated version of this patch.

Unfortunately I had to change the format of the compressed files slightly, so if anyone was brave/foolish enough to use the experimental version, he'll have a nice set of broken files now. :-)

I still have to add playback for compressed music, though...

comment:6 by digitall, 6 years ago

Component: Engine: Sword2
Game: Broken Sword 2
Note: See TracTickets for help on using tickets.