[Scummvm-devel] Idea: IndexedMp3AudioStream

Johannes Schickel lordhoto at gmail.com
Thu Oct 7 15:04:22 CEST 2010


On Thu, Oct 7, 2010 at 2:25 PM, yotam barnoy <yotambarnoy at gmail.com> wrote:
> On Thu, Oct 7, 2010 at 2:14 PM, Johannes Schickel <lordhoto at gmail.com> wrote:
>> On Thu, Oct 7, 2010 at 1:56 PM, Marcus Comstedt <marcus at mc.pp.se> wrote:
>>>> Johannes Schickel <lordhoto at gmail.com> writes:
>>>
>>> [...]
>>>> I take this index file will be written to disk too? I mean else we
>>>> would still suffer from the long delay on every time the MP3 file is
>>>> opened. Now how do you plan to handle filename clashes, like you have
>>>> two games with MP3 files for CDDA setup and then start one and then
>>>> the other, since savepath is the only real save place to write you
>>>> can't just use the mp3 filename and save the index to savepath.
>>> [...]
>>>
>>> It seems to me that the correct solution is not to have ScummVM write
>>> the index, but rather the tool which creates the MP3 from the CDDA
>>> tracks.  Then it becomes just another datafile (which does not need be
>>> writable), and the savepath is not involved.
>>>
>
> I think that's a terrific solution.
>
>>
>> That seems sensible, but that makes me wonder is there such a tool
>> already (i.e. a predefined format for that index file) or would we
>> have to write that tool for ourself? The later of course would make it
>> slightly less comfortable for the users to rip mp3 files, since they
>> couldn't use their standard ripper. But I guess since only small
>> devices are affected by this, it might be fine.
>
> What we could do is have a tool that simply takes mp3 files and
> creates index files for them. Then we don't have to mess with ripping
> CDs (which I believe could be a cross-platform pain).
>

Yup that should work fine for CD audio emulation at least. Since your
other mail suggests that this is the only place where you have
problems with MP3 sound, that should be just fine. For all the other
MP3 compressed sound data it would be still non-trivial to implement a
index file (just think of games which embed their sound files into
their own container files.

// Johannes




More information about the Scummvm-devel mailing list