fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] FluidSynth backend for SDL_mixer


From: James Le Cuirot
Subject: Re: [fluid-dev] FluidSynth backend for SDL_mixer
Date: Sun, 10 Oct 2010 23:34:59 +0100

On Sun, 10 Oct 2010 13:08:42 +1100
Matt Giuca <address@hidden> wrote:

> OK, well it would be exceedingly good to avoid duplicating all the
> MIDI event loading code. I don't think passing a file handle to
> FluidSynth would work in this specific case (or in several other
> general cases), because while SDL's RWop data structure does
> internally use a FILE*, that isn't part of the public interface to
> RWop. There would be similar problems if FluidSynth was extended to a
> C++ or Python wrapper -- how would you wrap this new proposed
> function? In C++ it would be expected to take an iostream, and in
> Python it would typically be expected to work on any object with a
> read() method.
> 
> Therefore I think David's suggestion is more extensible -- a function
> which takes a void* pointing to an already-loaded MIDI file in memory
> and loads it. Then the SDL_mixer backend can read all the bytes from
> the RWop into memory before passing it to FluidSynth; the C++ wrapper
> can load from an IOStream; the Python wrapper can read() into a
> memory buffer, etc.

It's okay if passing a file handle isn't possible. I really don't mind
as long as I can pass it in some kind of in-memory form. A void* buffer
would be fine.

Is anyone going to step up and try this? I could have a go but I'll
probably have to change the way things currently work a little.

James



reply via email to

[Prev in Thread] Current Thread [Next in Thread]