Tinsel MP3/OGG/FLAC support beta test

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
jimi
Posts: 7
Joined: Wed Jul 01, 2009 12:04 pm

Tinsel MP3/OGG/FLAC support beta test

Post by jimi »

Hi there,

I just implemented MP3/OGG/FLAC support into the tinsel (Discworld 1&2) engine. Currently it only works on Discworld 1, because I need to decode the audio data of Discworld 2.

Anyway, I would like to have some people test it out before I submit the patch. Anyone in here willing to do so?

Regards
Jimi
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Sounds great, nice :).

However, I would recommend that you just submit the patch anyway; that way, more people can easily beta test it, and moreover ScummVM devs can review it and give feedback on it, too. Like, we can check whether you comply to our code formatting guidelines, and maybe suggest ways to improve it.

I think that way will be much quicker overall.
User avatar
jimi
Posts: 7
Joined: Wed Jul 01, 2009 12:04 pm

Post by jimi »

Just uploaded it. It now works on DiscWorld2 (German) as well. Had to implement ADPCM 6-bit decoding.

btw. I'm copying the first 5000 bytes of *.smp into the compressed version so that detection still works. Also I'm using the first index for MP3/OGG/FLAC detection, this shouldn't hurt, because DW1 and DW2 never use it and I'm patching it back to 0 even in the engine code.

I tried to stay as close to the original code formatting as possible. Also I got really frustrated searching for a diff utility under win32 that is able to create patches.

Anyone interested in SCI mp3/ogg/flac support?

Regards
Jimi
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

jimi wrote: Anyone interested in SCI mp3/ogg/flac support?
Shouldn't that wait for the engine to stabilise?

Oh and thank you for adding compression to DW1&2
User avatar
jimi
Posts: 7
Joined: Wed Jul 01, 2009 12:04 pm

Post by jimi »

ezekiel000 wrote:
jimi wrote: Anyone interested in SCI mp3/ogg/flac support?
Shouldn't that wait for the engine to stabilise?
a resource.aud compressing utility isn't that much of a problem and the sound code seems to already work just fine. I wouldn't of course compress samples within resource.0*, because those are already compressed and it wouldn't save much discspace anyway.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

Oh right that's good then, I'm not a programmer but I keep up with the svn developments (quite a lot goes over my head :D )
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Post by KuroShiro »

jimi wrote:
ezekiel000 wrote:
jimi wrote: Anyone interested in SCI mp3/ogg/flac support?
Shouldn't that wait for the engine to stabilise?
a resource.aud compressing utility isn't that much of a problem and the sound code seems to already work just fine. I wouldn't of course compress samples within resource.0*, because those are already compressed and it wouldn't save much discspace anyway.
Though I certainly can't speak for the developers... having fooled around with various SCI games in ScummVM, I can say that the audio code on games that are large enough where compression would be worth it is very much still a work in progress. It works very well on SCI0 games, but not so well on newer games. Though who knows, maybe converting would actually simplify things.
User avatar
jimi
Posts: 7
Joined: Wed Jul 01, 2009 12:04 pm

Post by jimi »

KuroShiro wrote: Though I certainly can't speak for the developers... having fooled around with various SCI games in ScummVM, I can say that the audio code on games that are large enough where compression would be worth it is very much still a work in progress. It works very well on SCI0 games, but not so well on newer games. Though who knows, maybe converting would actually simplify things.
Did you try the latest SVN builds? King's Quest 5&6 are working quite nicely. And those are both full talkie versions, perfect for audio compression.
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Post by KuroShiro »

jimi wrote:
KuroShiro wrote: Though I certainly can't speak for the developers... having fooled around with various SCI games in ScummVM, I can say that the audio code on games that are large enough where compression would be worth it is very much still a work in progress. It works very well on SCI0 games, but not so well on newer games. Though who knows, maybe converting would actually simplify things.
Did you try the latest SVN builds? King's Quest 5&6 are working quite nicely. And those are both full talkie versions, perfect for audio compression.
Actually, two of the games I was referring to were my old CDs of KQ5 and 6 (as well as SQ4, QFG3). The speech plays pretty well, but the music sometimes plays too loudly or quietly, badly out of tune, or extremely slowly. Though I suppose that was about a week and ago so maybe it has been fixed up a bit since then. If so that is some nice progress.
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

Would there be a possibility or any gain from compressing the bmv files of DW2?
User avatar
SithlordDK
Posts: 65
Joined: Sat Nov 19, 2005 10:04 am
Location: Aperture Science Labs

Post by SithlordDK »

Can someone explain to me why I always get a "cannot open file: english.smp.idx" when I try to compress the "ENGLISH.SMP" (from the german version).
User avatar
ezekiel000
Posts: 443
Joined: Mon Aug 25, 2008 5:17 pm
Location: Surrey, England

Post by ezekiel000 »

you don't need to have the .smp on when you specify the filename.
MarkCoolio
Posts: 13
Joined: Mon May 12, 2008 9:54 am

Post by MarkCoolio »

Would it be possible to auto-rename the resulting compressed.smp and compressed.idx back to the original filename, let's say ENGLISH.SMP or GERMAN1.SMP/GERMAN1.IDX and so on?
Guess they have to be named like that again cos in Discworld 2 the 2 Speechfiles would otherwise be both named "compressed.smp" (which of course would not work in one directory ;-) )..
Thx in advance
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Post by KuroShiro »

MarkCoolio wrote:Would it be possible to auto-rename the resulting compressed.smp and compressed.idx back to the original filename, let's say ENGLISH.SMP or GERMAN1.SMP/GERMAN1.IDX and so on?
Guess they have to be named like that again cos in Discworld 2 the 2 Speechfiles would otherwise be both named "compressed.smp" (which of course would not work in one directory ;-) )..
Thx in advance
Once you've compressed it, you don't need the original any more as far as I can tell, though it isn't documented yet. Just rename the compressed file to be what the original was.
Post Reply