fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Making MIDI player read from a buffer


From: David Henningsson
Subject: Re: [fluid-dev] Making MIDI player read from a buffer
Date: Mon, 21 Feb 2011 00:52:40 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 2011-02-20 07:27, Matt Giuca wrote:
I have updated the midi-buffer branch with the previous two suggestions:
1. fluid_player_add_mem now copies the buffer before it stores it, so
the caller can now free it immediately (and it is now the caller's
responsibility to free).
2. Internally, fluid_midi_file now uses int buf_len and buf_pos instead
of pointers. This just makes things a little easier to think about.

As usual, I currently have it in a Bazaar branch in Launchpad here:
https://code.launchpad.net/~mgiuca/fluidsynth/midi-buffer
use:
bzr branch lp:~mgiuca/fluidsynth/midi-buffer

The full patch against the trunk (SVN r406) is viewable and downloadable
here:
http://bazaar.launchpad.net/~mgiuca/fluidsynth/midi-buffer/revision/360?compare_revid=336.1.14
The patch against my previous draft is here:
http://bazaar.launchpad.net/~mgiuca/fluidsynth/midi-buffer/revision/360?compare_revid=337

The example in the documentation has been updated to reflect the new
usage model.

It should be ready to merge now. The full patch can be downloaded here:
http://bazaar.launchpad.net/~mgiuca/fluidsynth/midi-buffer/diff/360/336.1.14

Thank you for your contribution - it has been merged! Also the adding an example in the documentation and for providing easy links in the email above was much appreciated!

I added out-of-memory checks on fluid_player_add and fluid_player_add_mem - I thought it made sense at least for the potentially big allocation of the midi file. I also swapped a row or two - some compilers (and the C standard?) are a little picky on mixing declarations with statements.

// David



reply via email to

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