1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-17 16:50:26 +02:00

Define some useful type aliases for arrays of floats and doubles

This commit is contained in:
Paul Licameli 2016-04-14 00:46:48 -04:00
parent aebaaf46a0
commit 1eff721f09
2 changed files with 18 additions and 1 deletions

View File

@ -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)

View File

@ -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