mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 00:50:52 +02:00
Define some useful type aliases for arrays of floats and doubles
This commit is contained in:
parent
aebaaf46a0
commit
1eff721f09
@ -513,7 +513,17 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
using ArrayOf<ArrayOf<X>>::reinit;
|
||||
template< typename Integral >
|
||||
void reinit(Integral count)
|
||||
{
|
||||
ArrayOf<ArrayOf<X>>::reinit( count );
|
||||
}
|
||||
|
||||
template< typename Integral >
|
||||
void reinit(Integral count, bool initialize)
|
||||
{
|
||||
ArrayOf<ArrayOf<X>>::reinit( count, initialize );
|
||||
}
|
||||
|
||||
template<typename Integral1, typename Integral2 >
|
||||
void reinit(Integral1 countN, Integral2 countM, bool initialize = false)
|
||||
|
@ -12,6 +12,7 @@
|
||||
#define __AUDACITY_SAMPLE_FORMAT__
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "MemoryX.h"
|
||||
#include <wx/defs.h>
|
||||
|
||||
#include "audacity/Types.h"
|
||||
@ -151,4 +152,10 @@ void ReverseSamples(samplePtr buffer, sampleFormat format,
|
||||
|
||||
void InitDitherers();
|
||||
|
||||
// These are so commonly done for processing samples in floating point form in memory,
|
||||
// let's have abbeviations.
|
||||
using Floats = ArrayOf<float>;
|
||||
using FloatBuffers = ArraysOf<float>;
|
||||
using Doubles = ArrayOf<double>;
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user