Greetings,
I’m a developer on a new project to provide closed-captioning for
games. My first target is DirectX/DirectSound, but I’m curious - are
there currently any plans to do such within SDL? If not, is it
something people would be interested in?
The project I’m working on will be based on the ideas behind the
Doom3[cc] user interface (http://doom3cc.planetdoom.gamespy.com/),
with the tech being something along the lines of the following:
1.) Inject DLL into game
2.) Hook DirectX/DirectSound COM objects to gain access to the
render graph and audio playback API
3.) Associate audio clip playback to a unique ID/File/etc.
4.) When an audio clip is triggered, draw text from an XML entry
for the clip id onto the canvas.
5.) Rinse, repeat.
At anyrate, looking at the SDL mixer docs, it seems like it would be
trivial to create an association map between Mix_Chunk’s and their
sources, then play the captioning whenever a Mix_PlayChannel()
function is called on a captioned mixer chunk. Therefore, I suspect
it would pretty easy to implement an almost completely transparent
captioning API built directly into SDL that could be turned on by a
user if desired. All that would be required then to support
closed-captioning in a game that used a .DLL version of SDL would be
to generate the XML file with the actual captions and associations
(and yes, that is the hard part O.o) .
Is this something people would be interested in having? It’ll take me
a while to complete the DirectX/DirectSound version, but if there’s
interest in having such features built into SDL I’d be happy to pitch
in to implement it here once I’m done with the first. If there are
other people interested in implementing such in SDL, then I’d like to
coordinate efforts so we end up with a compatible XML captioning
format that we can build common tools for.
My plan is to release the DirectX/DirectSound captioning code I write
under BSD or a similar license, because it’s something I really want
people to implement in any of their own commercial or non-commercial
products. However, I’d be happy to allow for re-use/re-licensing of
the code under pretty much any license anyone wants (LGPL, etc) that
leaves my name somewhere in the comments of any source files I write
Cheers,
Mike Ellison
@Michael_Ellison