[Flac-dev] FLAC support for unsupported win32 programs
Richard Ash
richard at audacityteam.org
Sun Nov 16 12:31:32 PST 2008
On Fri, 2008-11-14 at 17:34 -0800, Aaron "Caustik" Robinson wrote:
> Not sure if this tool already exists in some form, or if it's been
> talked about before.. but I got to thinking of a way to support FLAC
> in applications that haven't added support in their code:
>
> In windows, programs can be launched using the Microsoft Detours API
> (or similar). This API can be used to do binary instrumentation on the
> programs.
>
> This instrumentation can be used to intercept file i/o calls. This
> means that we can simulate the existance of a .wav file (for example),
> even when that file does not really exist.
>
> This capability can be harnessed by creating a wrapper program that
> opens a .flac file, and pretends that it is actually a file with
> a .wav extension. To the application, it sees a wav file. Behind the
> scenes, the wrapper utility would convert all file read/writes to FLAC
> files.
>
> With some creative instrumentation, this technique could give users
> the capability to open FLAC files with their default .wav file
> handler. Also, the technique could even support drag+drop operations
> (with an explorer plugin and/or explorer instrumentation).
>
> Anyway, I think this is very feasable, but thought I would run it
> through you FLAC developers before digging into it deeper. It would be
> really nice to have FLAC support in a great number of random DJ tools
> I've been using that do not support it already (not to mention various
> other multimedia applications).
>
> This could also really help make FLAC a more popular format, which is
> good for us all :)!
>
> What'dya think?
I've not seen or heard of anything for FLAC, but I believe this is how
Avisynth and Virtual Dub's aviproxy work for AVI files on windows.
http://avisynth.org/mediawiki/Main_Page
http://virtualdub.org/docs_frameserver.html
In those cases, it seems to be a very useful idea which is a bit less
than 100% reliable, but invaluable for those programs / situations where
it works. It might be easier for WAV than AVI because we don't have as
many windows APIs to worry about.
Richard
More information about the Flac-dev
mailing list