Loading Time Problem with Loom CD Version

Subforum for discussion and help with ScummVM's Nintendo Wii port

Moderator: ScummVM Team

Axel
Posts: 37
Joined: Fri Jul 24, 2009 6:17 pm

Post by Axel »

Just wanted to provide a quick update on my testings... I have not been able to run it with the sound synched and without lag.

I have tried with the latest snapshot that dhewg provided me the link to download, it was only a little better, but basically the same happens. Sound lags; mostly during parts with a lot of dialog, and whenever I click on a note to play it takes from 2-3 secs with the screen frozen until it is actually played.

What I am doing now is trying different encode methods. I have re-encoded my audio file to all the following files:

FLAC (default) --> 255,402 KB
FLAC --best --> 254,247 KB
LAME (default) --> 51,267 KB
LAME -t -q 0 -b 96 --> 38,450 KB
OGGENC (default) --> 40,571 KB
OGGENC -q 5 --> 55,309 KB

I will try each file one by one during the weekend using the latest snapshot to see which gives me the best performance and if (hopefully) some gives me the synched sound I am looking for.

After that I will keep you posted of my results. Thanks all!

User avatar
dhewg
ScummVM Porter
Posts: 169
Joined: Wed Jun 04, 2008 8:41 pm

Post by dhewg »

I appreciate the tests, thanks for that!

Since I used the very same binary to check this problem I don't think this is a software problem of the port itself. I guess this can be the media you use to load Loom from.
Its either the latency to read data, the seek time or the throughput. What kind of media are you using? And do you have another SD card, USB mass storage device you can test it with?

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

I thought I'd have another look at this as I only looked at the first part of the game the other day. Not very scientific.

For all these tests I loaded the ScummVM boot.elf with wiiload.
I made mp3, ogg and flac versions of the CDDA track. I just used the default settings.
I tried them with a Kingston SD 2GB and a SanDisk SDHC 4GB.
It's only a class 2 SDHC card which I think is the write speed anyway although I'm not sure. I think SanDisk use the word 'class' to refer to write speed whilst some use it for read speed and I think some use a mixture. So much for standards.

It can be a little difficult working out if it's all in sync when all you have is 2 eyes and their body language.

I believe the SDHC card improved things a little.
I found flac was distorting in some places though.
Whilst it seemed as though sometimes a line of speech would be played and after it had stopped you could still see the character speaking the line (body language!) at other times it seemed vice-versa. That is the character had visually stopped speaking whilst the line/audio was still playing.
Which makes me think maybe Musically could be right.
It only makes sense that things would go out of sync when ths Wii has problems decoding so much data (the audio track for Loom is huge!).
Maybe try a SDHC card and I'd use ogg. I found it a little better than mp3. I don't keep up with SD cards so I don't know what the best SDHC card would be. Last I checked you could get class 6 SanDisk. With that said I have to point out that this is just advice. I wouldn't want you buying a SDHC card just for this expecting it to work although I get the impression you understand that.

Dhewg
I tried the fattest build with Loom audio as well.
I used a SanDisk USB2.0 2GB stick.
Again with wiiload I used a regular buildbot version first.
I found the audio distorting quite a bit but when I used the fattest build there was less distortion. There was still a little though.
I've just remembered I have a USB2.0 250GB portable hard drive. I could try it with that if you want.

A question:
Couldn't all this be done a bit more...scientifically? Or is there little documentation for the Wii. Is it just not a matter of encoding the audio to a version that the Wii is OK with?
For example the Nintendo DS supports the game. You need to use compressed .wav. IMA ADPCM. 22050Hz. Mono.
If I get time I'll have a play with this over the weekend. So long as I can find my DS that is.

Has anyone been reading the thread about loom from Steam?
The audio comes in a file called CDDA.sou. It's about half the size of the .wav. About the same size as the .flac.
Last I checked nobody knew exactly how it's encoded though.

Axel
Posts: 37
Joined: Fri Jul 24, 2009 6:17 pm

Post by Axel »

Ok guys, it was a long weekend. I played exhaustively Loom CD with all 6 encoding methods for the audio track.

I also tested them with both ScummVM 0.13.1 and with the latest snapshot for 1.0.0.

Additionally I reformatted my SD (no SDHC) cards both Kingston 2 GB and Samsung Pleomax 1 GB to FAT with a cluster size of 16384 KB.

I'm glad to inform you that I can confirm you that Loom CD can be played flawlessly on the ScummVM for Wii. This is a summary of my results:

1) Regarding SD cards:

Using either SD card I got the same results, so it seems it was not relevant for the performance of the game. Keeping them recently formatted, or defragmented is recommended.

2) Regarding ScummVM version:

Latest snapshot was slightly better, but still lagged when using MP3 format to encode Loom audio track. Lag times decreased from ~ 4-5 secs. to ~ 1-3 secs. Hence, it is widely recommended to use the latest snapshot over 0.13.1 version.

3) Regarding encoding format for audio track:

3.a) MP3 (default parameters) - Using the default encoding parameters for Lame (128 Kbps) caused brief hang ups, mostly noticeable at the beginning of the game before the Loom title starts to twinkle, and when a note is played on the staff. The game freezes for about 0.5 - 2 seconds before the sound is actually played. The dialogs during the cutscenes become desynchonized, the body language of the characters stops several seconds before and the audio keeps being played. This results very annoying. Using scummvm 0.13.1 this is more noticeable than with the snapshot. If the body language is not enough to appreciate the desynchonization, turn subtitles ON, so you can see how the subtitles disappear much before the audio is actually played. The subtitles must be turned from the in-game menu, since they become disabled each time the game is loaded.

3.b) MP3 (bitrate 96) - Using parameters provided in the scummvm readme.txt to encode audio using LAME, the audio is encoded to 96 Kbps. I originally thought this would result in shorter hang ups and less noticeable desynchronization, but I can confirm the result is exactly the same. No improvement by encoding the MP3s at a lower bitrate, and neither by making their size smaller.

3.c) FLAC (with both default and best compressions) - The results for FLAC files were very good. Red_Breast mentions he noticed some audio corruption, but I didn't notice any with both of my FLAC files. It seems that having an enormous size of over 250 MB doesn't affect performance, on the opposite, having a simple compression method makes the decoding of the audio fast and it is very well synchonized. The only drawback for this is that the game will eat up a big amount of space in your card.

3.d) OGG (default parameters) - This encodes the audio track with Quality 3 setting. The resulting file is pretty small (40 MB). I was amazed how good this played. It played as good as with FLAC, with absolutely no hang ups, loading times or dialog desinchronization, but with a way smaller filesize!

3.e) OGG (quality 5) - I used the -q 5 parameter mentioned in the scummvm readme file, and it generated a bigger file (55 MB), however, after listening carefully to both OGG files, I could not notice any difference in the sound. Probably the sampling at what the voices were recorded was not very high and hence does not require this level of quality for encoding. The game sounds exactly the same as encoded with quality 3. This setting might make a difference when encoding songs from a music CD, but for Loom voices I really think it is not necessary.

Summarizing
------------

The problem with the audio track in Loom freezing up and getting out of sync is related to MP3 encoding. I am assuming that the difference with encoding this particular game with MP3 to those using MONSTER.SOU o BUN files is that those internally are not one single sound file, they are a collection of hundreds of small sound files which get encoded independently, so whenever one of those is to be played, it only takes that little part to decode and reproduce.

For Loom, I am pretty sure that what makes it slow is that all the sounds exist in one single track/file, so every time a sound will be played, the whole MP3 has to be decompressed. I dare to say that MP3 algorythm may be a little too heavy so when decoding very very big files it stutters.

Conclusion
-----------

My final recommendation is not to use MP3 to encode Loom CD. Having a 50 MB MP3 file is not very efficient not even when running from a PC.

My preferred format for encoding this game audio would be Vorbig OGG with default settings, -q 5 is not required since it will make no difference, and using default settings will result in a 40 MB file which is of a very good size to make this game portable on any platform.

FLAC works great too, but having a 250+ MB file is not a great deal, mostly when you can have the exact same experience by encoding the audio to the 40 MB OGG file.

------------------------------------------

Thank you all for your support on this, I really expect everybody can now play this game as it was meant to be. I am currently enjoying it a lot already on my Wii!

Best regards,

User avatar
dhewg
ScummVM Porter
Posts: 169
Joined: Wed Jun 04, 2008 8:41 pm

Post by dhewg »

Thanks to both of you, the results should help out other users.
I'm not sure if I ever tried Loom CD + MP3 tracks, I mostly use FLAC.

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

Like I said I thought ogg was the best but I thought SDHC also had some impact. Looks like I was wrong.
I tried the game with a DS which uses compressed wav yesterday.

Both gave similar results. The start of the game is out of synch a little but gets better when you reach the second part of the game where Bobbin enters the Loom room and talks with the others.

I imagine ogg is the best for any game that uses one big CDDA track like Lost In Time and the Gobliiins series.

gunbaum
Posts: 2
Joined: Sun Feb 08, 2009 8:02 pm

THE ANSWER

Post by gunbaum »

Heya there,

it took me a long time to get my loom version up and running.
had the same problems (on my SE P1i and on the Nintendo DSi)
- out of sync
- long loading times until sound/music appears


the solution is relatively simple:
grab your favorite encoder/decoder combo and select the following format

IMA ADPCM 22,050 kHz; 4 Bit; Mono

after conversion the file is s about 35MB big and you will get rewarded with perfect sync and loading times :)

ENJOY!
*gunbaum

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

If support were ever added for the Steam version's CDDA.SOU file, would that stream better?

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

I guess we'd need somebody with the game. I have no reason to buy it off Steam. I already have the DOS CD, although I'm hoping to pick up the TG16 release soon.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

Red_Breast wrote:I guess we'd need somebody with the game. I have no reason to buy it off Steam. I already have the DOS CD, although I'm hoping to pick up the TG16 release soon.
Not even at its current asking price of £1.49 (or £1.74 for the complete LucasArts Adventure Collection)?

(And I also have the original DOS CD, funnily enough. XD)

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3330
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

marzipan wrote: Not even at its current asking price of £1.49 (or £1.74 for the complete LucasArts Adventure Collection)?
As long as Steam is Windows-only, and I already have the games on CD, that's still not worth it to me. And I bought the Swedish version of Freddi Fish 1 twice. ;)

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

I have a Windows XP PC in the back (read - cold) room. I rarely fire it up. I use Linux mostly.
I've read that Steam works with Wine but I assume that's the Steam interface/menu. For the games it would be case by case wouldn't it? Some working, some not.
It's a great price but it's also £1.49 towards a TG16 Loom although first off this year I think I'll get one of the new ScummVM T-shirts.

Post Reply