On 11/9/05, Kelvin Lawson <[EMAIL PROTECTED]> wrote:
> Yay! Let me know when it's populated; I added support for archives this
> morning. The disc I burned with it last night worked correctly on a
> standalone CD+G player, so the tool is confirmed working.

Good stuff. I've just populated CVS with the v0.2 release, so you should
be good to go.

Committed (and README updated as well).

> The only thing it's missing is support for that raw/interleaved mode; my
> *drive* supports the writing scheme, I just don't know how to *image* it
> :) Anyway, just search in the code for "not yet supported" and you'll
> find the only missing piece of functionality. Command-line options are
> already present for raw mode. It just needs the magic code added. I
> assume it's something that can be done on a per-frame basis and can just
> be added inside the main interleaving loop; if not, it could be more
> "interesting" to implement.

Note sure what you mean by per-frame? I was thinking of passing a
track's worth of BIN data to an Interleave() function which rearranges
the whole track's BIN data in one go.

Something like:

for track in tracks:
   pcmdata = mp3DecodeFromFile(track.mp3_file)
   cdgdata = cdgReadFromFile(track.cdg_file)
   if interleave_mode:
     cdgdata = Interleave(cdgdata)
   AddToBinFile(pcmdata, cdgdata)

Close; actually produce_bin() is the call that does the gruntwork, but it reads straight from files (it doesn't slurp up everything into memory all at once; it works from disk). It does accept a "raw" flag but currently ignores it; I guess you could alter it so that if "raw" set to "true" it just loads in the whole CDG file first, does its mangling, then write out that data instead of reading from a cooked CDG file 96 bytes at a time.

Have a look at the code; it should be more clear how things work there once you look at it :)

It would be "easier" to write a function that mangles 96 bytes (one frame's worth) at a time; then you'd just have this:

Instead of:
binfile.write(cdg)

Use:
if rawbin:
    binfile.write(reinterleave_cdg(cdg))
else:
    binfile.write(cdg)

It's your call though, do as you wish with it :)

--
Looking for something to read? Visit http://willfe.com/ ... it's easy, safe, and fun for the whole family!

Reply via email to