summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_unit.cc
AgeCommit message (Collapse)Author
2019-10-15Fix typos in AU channel-count calcRobin Gareus
2019-10-15API to count max multi-channel plugin outputsRobin Gareus
2019-10-02remove all use of NO_PLUGIN_STATE #ifdefPaul Davis
We determined several years that we should never ever do this, and changed the basis for the free/demo copy because of that.
2019-09-11Who needs semicolons?Robin Gareus
2019-09-11AU: fix optional buffersRobin Gareus
The spec [1] says: "If the mData pointers are null, the audio unit can provide pointers to its own buffers. In this case, the audio unit must keep those buffers valid for the duration of the calling thread’s I/O cycle." A plugin *can* do this, but it does not need to. An extra NULL test is required. furthermore [2] specifies "mDataByteSize - The number of bytes in the buffer pointed at by the mData field." In case the host does not provide any buffers, this is obviously zero. [1] https://developer.apple.com/documentation/audiotoolbox/1438430-audiounitrender?language=objc [2] https://developer.apple.com/documentation/coreaudiotypes/audiobuffer?language=objc
2019-09-11AU: don't consider in-place if there are no inputsRobin Gareus
2019-08-03Update libardour GPL boilerplate and (C) from git logRobin Gareus
2019-05-12Make the configuration penalty subtler about inputsJulien "_FrnchFrgg_" RIVAUD
Instead of uniformly demote configurations with a non-matching audio input count (using a penalty offset of 1000), also grade the impreciseness of the configuration so that those with the nearest input count are preferred. As for outputs, give a slightly higher handicap to configuration with too many inputs with regard to the actual audio inputs that can be fed to the plugin. POLICY CHANGE: when only imprecise configurations are found the actually selected one can be different (better) than before this commit.
2019-05-12Remove ad-hoc handling of possible_in == 0Julien "_FrnchFrgg_" RIVAUD
Just make the code responsible for possible_in > 0 also handle possible_in == 0 since it nearly does the same thing. The only difference is that the possible_in == 0 case, by using FOUNDCFG(), acted as if possible_in was audio_in. The consolidated code uses FOUNDCFG_IMPRECISE which will add some penalty to the configurations where desired_in == possible_in != audio_in. There is thus a small POLICY CHANGE, but the selected configuration will stay the same unless a better matching configuration is available.
2019-05-12Enable overriding the configuration penaltyJulien "_FrnchFrgg_" RIVAUD
This relieves exact matches of the need to duplicate the bookeeping done by FOUNDCFG()
2019-05-12Merge input-imprecise pass into the main passJulien "_FrnchFrgg_" RIVAUD
Still no policy change, since when a configuration is chosen that would have belonged to the second pass, then its penalty will be increased by 1000 and it will be selected only as last recourse.
2019-05-12Introduce a macro for imprecise configurationsJulien "_FrnchFrgg_" RIVAUD
It enables only setting the imprecise audio channel count if the configuration is indeed selected.
2019-05-12Merge some cases to avoid duplicated logicJulien "_FrnchFrgg_" RIVAUD
Merge the cases in == -1 and in == -2 since those are both wildcards, almost symmetric in the AU spec, and handled completely symmetrically by the code here considering it accepts invalid or unspecified demands. Also merge the cases in > 0 and in < -2 since they are handled exactly the same as far as outputs are concerned. No policy change
2019-05-12Replace the exact_match logic by a negative penaltyJulien "_FrnchFrgg_" RIVAUD
Instead of doing an initial loop for detection of exact matches, then letting the following loop set \audio_out yet ignore its value, merge the two loops but give exact matches a negative penalty so that the \audio_out value they set won't change afterwards. No policy change.
2019-05-12Remove never-matching assertJulien "_FrnchFrgg_" RIVAUD
Since previous line just asserted that possible_in > 0, it is necessarily non-null and the test is always true.
2019-05-12Prefer int32_t to int for channel countsJulien "_FrnchFrgg_" RIVAUD
To match the actual type used by ChanCount. Keep the int type in the structure passed in by the Audio Unit, because we have no control over it.
2019-04-13NO-OP: <tab> after <space> fixes in libsRobin Gareus
2019-03-11Remove generic parameter-printerRobin Gareus
This has been superseded by value_as_string() along with meta-data from parameter-descriptor, which is supported by all standards, except VST.
2019-02-28Copy state when replicating an AU pluginRobin Gareus
This is only used for plugin-analysis, AU plugins are otherwise not replicated, and variable-i/o is used instead
2019-02-17Clean up Latency API (Processor vs Plugin)Robin Gareus
Plugins are only a source of Latency (Plugin delay). The API to query, signal and override Latency is managed by PluginInsert.
2018-12-03Consistent AU factory Preset IDsRobin Gareus
Use AU's preset->presetNumber as identifier since std::map are sorted this also indirectly sorts presets by preset-number. (user presets start with a '/' and are listed first, sorted by name). Since Presets are now identified by URI on session load (53a0199a0) and AU user-presets can added/be removed (since ae4604a24b7), simple sequential numbering is no longer an option.
2018-12-02Don't invalidate AU preset on loadRobin Gareus
This works around async parameter-changed signal emission when loading an AU preset. A simple timeout is used to delay making the preset as modified.
2018-12-02Implement AU plugin-preset removalRobin Gareus
2018-12-02Towards fixing AU preset invalidationRobin Gareus
This is a step in the right direction: first load the preset and only if preset-loading was successful mark it as loaded. This still does not properly unset "parameter_changed_since_last_preset". AU signals "kAudioUnitEvent_ParameterValueChange" later in the event-loop.
2018-12-01AU: mark preset dirty when parameter changesRobin Gareus
2018-12-01Fix AU preset handlingRobin Gareus
load_property_list() takes a file-path (not URI). Actually it's not clear why we've ever used a `file:///` URI internally.
2018-11-04Optimize Plugin connect & run API, use const mapsRobin Gareus
2018-04-26Fix issue with AU plugin-analysisRobin Gareus
Copy c'tor needs to initialize "audio_input_cnt".
2018-04-24Use URIs to identify plugin-presetsRobin Gareus
This fixes duplicate AU presets when adding a new preset. Presets are kept in a std::map<URI,...> adding a new presets uses the file-URI as ID. Loaded presets needs to have the same URI.
2018-01-30Update plugin classificationRobin Gareus
* dedicated API for classes (effect, instrument, util) * prepare for tags (rather than categories) * prepare removal of per-plugin in_category() API
2018-01-12Refine 31f79489, de-duplicate AU I/O configurationsRobin Gareus
2018-01-11Fix AU i/o busses accounting.Robin Gareus
This fixes issues for synths with zero audio input, explicit default stereo config and optional busses.
2017-09-19More Coreaudio SDK fixes, after 30b087ab3Robin Gareus
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
2017-06-21remove min/max unbound -- LADSPA special case.Robin Gareus
This explicit case should never have existed in the first place. Plugins can always implicitly exceed the range and are expected to cope with out-of-range values (e.g. meters when fed with a peaking signal may return an out-of-bounds value)
2017-05-25Implement basic AU parameter-printingRobin Gareus
(don't leave buf uninitialized)
2017-04-19Use XMLNode::get/set_property API in AudioUnit related classesTim Mayberry
2017-03-21Improve plugin Ccategory consistency somewhatRobin Gareus
2017-03-11Fix possible segfault in multi-bus AUs.Robin Gareus
2017-01-20Add a note.Robin Gareus
2016-12-03Remove Evoral::MIDIEventDavid Robillard
It is slightly questionable whether type specific methods like velocity() belong on Event at all, these may be better off as free functions. However the code currently uses them as methods in many places, and it seems like a step in the right direction, since, for example, we might some day have events that have a velocity but aren't stored as MIDI messages (e.g. if Ardour uses an internal musical model that is more expressive). In any case, the former inheritance and plethora of sloppy casts is definitely not the right thing.
2016-11-11fix compilation on osxnick_m
2016-11-11audio units uses quarter_notes_per_minute().nick_m
2016-11-10Add AU support for output-channel/bus groupingRobin Gareus
2016-08-19and another typo gone in in 9702020Robin Gareus
2016-08-19fix typo in 9702020Robin Gareus
2016-08-18Report quarter note rather than beat position to AU plugins.nick_m
2016-08-17fix ramped BPM reporting to AU and VST pluginsRobin Gareus
2016-07-16handle no audio-output AUsRobin Gareus
2016-07-16improve AU Latency PropertyChange EventsRobin Gareus