|
From: | David Henningsson |
Subject: | Re: [fluid-dev] Revised patch for allNotesOff, allSoundsOff |
Date: | Sun, 30 Jan 2011 09:37:38 +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-01-29 20:54, jimmy wrote:
--- On Fri, 1/28/11, David Henningsson<address@hidden> wrote:In think you missed my original comment: Can you elaborate on where/why this is useful? These are not public API functions and aren't used anywhere. I was thinking of removing the ones not starting with _LOCAL. // DavidSorry, I missed it. I do play around with vkeybd. Sometimes the mouse or keyboard switched out before the note is released and I got stucknotes. Playing with aplaymidi and Ctrl-C out of it leaves stuck notes. I try other stuff, too, but those are the simplest examples. Short of trying the "fluid_synth_system_reset()" (which also reset all the current settings for all channels, which I don't want most of the time). I simply need to turn all the notes/voices off without having to call the full "fluid_synth_system_reset()". Of course, I prefer not having to call allNotesOff/allSoundsOff once per channel.
Right, but my point is that since these are not public API functions, how can you use the new functionality anyway?
If you want them to be public API functions, and I'm ok with that if people find it useful, here is what you need to do:
1) Make sure they're declared in include/fluidsynth/synth.h rather than src/synth/fluid_synth.h, and prefixed with FLUIDSYNTH_API.
2) Make sure any dereference to synth is inside fluid_synth_api_enter / fluid_synth_api_exit (or one of the macros calling this function). If you have called fluid_synth_api_enter, all exit paths must call fluid_synth_api_exit before returning.
Also note that FLUID_SYNTH_ENTRY_CHAN returns with error if chan == -1. // David
[Prev in Thread] | Current Thread | [Next in Thread] |