#3590 closed defect (fixed)
FOTAQ: Low sample rate
Reported by: | SF/j_w_ | Owned by: | cyxx |
---|---|---|---|
Priority: | normal | Component: | Engine: Queen |
Version: | Keywords: | ||
Cc: | Game: | Flight of the Amazon Queen |
Description
The voices in Flight of the Amazon Queen appear to be playing at a lower sample rate in ScummVM than it does in DOS.
I have noticed this with the original audio and Ogg Vorbis compressed audio using the Windows version as well as the Windows CE version of ScummVM 0.11.0 and older versions.
I am using the original English Talkie version of the game.
Ticket imported from: #1876741. Ticket imported from: bugs/3590.
Attachments (3)
Change History (22)
comment:1 by , 17 years ago
Summary: | Sample rate a bit too low? → FOTAQ: Low sample rate |
---|
comment:2 by , 17 years ago
Owner: | set to |
---|
comment:3 by , 17 years ago
comment:4 by , 17 years ago
Owner: | changed from | to
---|
comment:6 by , 17 years ago
Looking at the disasm of the DOS executable, it seems .SB files have a "playback frequency index" field we don't handle/read (it's not at a fixed offset, as the header has variable length).
The frequency table is
3951, 4186, 4435, 4699, 4978, 5274, 5588, 5920, 6272, 6645, 7040, 7459, 7902, 8372, 8870, 9397, 9956, 10548, 11175, 11840, 12544, 13290, 14080, 14917, 15804, 16744, 17740, 18795, 19912, 21096, 22351, 23680, 25088
I just looked at a single file, the index is equal to 19 (11840 Hz) in it...
TODO: properly reverse the .SB file format and add the parsing code to ScummVM :)
comment:7 by , 17 years ago
here's a possible attempt at fixing this (this patch hasn't been tested more than the first rooms) File Added: 1876741.diff
by , 17 years ago
Attachment: | 1876741.diff added |
---|
comment:9 by , 17 years ago
Updated patch (I ran the parsing code on all the .sb files of the french version of the game, and all of them use the frequency index 19, so maybe it would be simplier to just to replace 11025 by 11840 ?). If this gets applied, compress_queen should probably also get updated/'fixed'.
File Added: 1876741.diff
comment:10 by , 16 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:12 by , 16 years ago
Doesn't it also mean that we should update the freeware versions of FotAQ, since the compressed sounds claim to be 11025 Hz, instead of 11840 Hz?
Another alternative, I guess, would be to cheat and add some way of overriding the frequency for compressed sounds.
comment:13 by , 16 years ago
I'm attaching two examples of how such a cheat could be implemented. One adds an extra parameter to playInputStream(). The other uses a wrapper class for FotAQ's audio streams. File Added: queen-sound1.diff
comment:15 by , 16 years ago
Indeed, rebuilt versions need to be fixed (actually they should have already been, see tracker item #1599393 ; but I didn't take the time to do it...).
So, either we release new versions (and update compress_queen, if resampling from 11840 Hz is ok for lameenc/oggenc), either we apply one or your patches...
comment:16 by , 16 years ago
Hi, I am very pleased that my bug report gets this much attention!
I'd like to add that I am sure OggVorbis is not going to cause any trouble using exotic sample rates. I think MP3 will though, but I'm not sure about LameMP3. I actually try to avoid MP3 as much as possible ;-)
comment:17 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:18 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:19 by , 16 years ago
I just noticed that the second patch leaks memory. I've submitted a fixed version to the patch tracker, where it's less likely to be forgotten.
How do you know that the sample rate is lower?