add some more documentation

This commit is contained in:
Robin Gareus 2016-03-25 16:50:45 +01:00
parent dd27620566
commit 9a8a164930
2 changed files with 16 additions and 7 deletions

View File

@ -27,18 +27,20 @@
namespace ARDOUR { namespace DSP {
/** C Shared Memory
/** C/C++ Shared Memory
*
* A convenience class representing a C array or float[] or int32_t[]
* A convenience class representing a C array of float[] or int32_t[]
* data values. This is useful for lua scripts to perform DSP operations
* directly using C, C++.
* Access to this memory area is always 4 byte aligned: float, int.
* directly using C/C++ with CPU Hardware acceleration.
*
* This memory area can also be shared between different instances.
* Access to this memory area is always 4 byte aligned. The data
* is interpreted either as float or as int.
*
* This memory area can also be shared between different instances
* or the same lua plugin (DSP, GUI).
*
* Since memory allocation is not realtime safe it should be
* allocated during dsp_init() or dsp_configure().
*
* The memory is free()ed automatically when the lua instance is
* destroyed.
*/
@ -220,7 +222,7 @@ namespace ARDOUR { namespace DSP {
void run (float *data, const uint32_t n_samples);
/** setup filter, compute coefficients
*
* @param t filter type
* @param t filter type (LowPass, HighPass, etc)
* @param freq filter frequency
* @param Q filter quality
* @param gain filter gain

View File

@ -47,11 +47,18 @@ class TempoMap;
/** Tempo, the speed at which musical time progresses (BPM). */
class LIBARDOUR_API Tempo {
public:
/**
* @param bpm Beats Per Minute
* @param type Note Type (default `4': quarter note)
*/
Tempo (double bpm, double type=4.0) // defaulting to quarter note
: _beats_per_minute (bpm), _note_type(type) {}
double beats_per_minute () const { return _beats_per_minute;}
double note_type () const { return _note_type;}
/** audio samples per beat
* @param sr samplerate
*/
double frames_per_beat (framecnt_t sr) const {
return (60.0 * sr) / _beats_per_minute;
}