Audacity  2.3.1
Classes | Macros | Typedefs | Enumerations | Functions
Types.h File Reference
#include <algorithm>
#include <wx/string.h>
#include <wx/arrstr.h>
#include <type_traits>

Go to the source code of this file.

Classes

class  sampleCount
 

Macros

#define SAMPLE_SIZE(SampleFormat)   (SampleFormat >> 16)
 

Typedefs

typedef char * samplePtr
 
typedef const char * constSamplePtr
 
typedef wxString PluginID
 
typedef enum ChannelNameChannelNames
 

Enumerations

enum  sampleFormat : unsigned { int16Sample = 0x00020001, int24Sample = 0x00040001, floatSample = 0x0004000F }
 
enum  ChannelName {
  ChannelNameEOL = -1, ChannelNameMono, ChannelNameFrontLeft, ChannelNameFrontRight,
  ChannelNameFrontCenter, ChannelNameLowFrequency1, ChannelNameBackLeft, ChannelNameBackRight,
  ChannelNameFrontLeftCenter, ChannelNameFrontRightCenter, ChannelNameBackCenter, ChannelNameLowFrequency2,
  ChannelNameSideLeft, ChannelNameSideRight, ChannelNameTopFrontLeft, ChannelNameTopFrontRight,
  ChannelNameTopFrontCenter, ChannelNameTopCenter, ChannelNameTopBackLeft, ChannelNameTopBackRight,
  ChannelNameTopSideLeft, ChannelNameTopSideRight, ChannelNameTopBackCenter, ChannelNameBottomFrontCenter,
  ChannelNameBottomFrontLeft, ChannelNameBottomFrontRight
}
 

Functions

bool operator== (sampleCount a, sampleCount b)
 
bool operator!= (sampleCount a, sampleCount b)
 
bool operator< (sampleCount a, sampleCount b)
 
bool operator>= (sampleCount a, sampleCount b)
 
bool operator> (sampleCount a, sampleCount b)
 
bool operator<= (sampleCount a, sampleCount b)
 
sampleCount operator+ (sampleCount a, sampleCount b)
 
sampleCount operator- (sampleCount a, sampleCount b)
 
sampleCount operator* (sampleCount a, sampleCount b)
 
sampleCount operator/ (sampleCount a, sampleCount b)
 
sampleCount operator% (sampleCount a, sampleCount b)
 
size_t limitSampleBufferSize (size_t bufferSize, sampleCount limit)
 

Macro Definition Documentation

#define SAMPLE_SIZE (   SampleFormat)    (SampleFormat >> 16)

Typedef Documentation

typedef enum ChannelName * ChannelNames
typedef const char* constSamplePtr

Definition at line 204 of file Types.h.

typedef wxString PluginID

Definition at line 209 of file Types.h.

typedef char* samplePtr

Definition at line 203 of file Types.h.

Enumeration Type Documentation

Enumerator
ChannelNameEOL 
ChannelNameMono 
ChannelNameFrontLeft 
ChannelNameFrontRight 
ChannelNameFrontCenter 
ChannelNameLowFrequency1 
ChannelNameBackLeft 
ChannelNameBackRight 
ChannelNameFrontLeftCenter 
ChannelNameFrontRightCenter 
ChannelNameBackCenter 
ChannelNameLowFrequency2 
ChannelNameSideLeft 
ChannelNameSideRight 
ChannelNameTopFrontLeft 
ChannelNameTopFrontRight 
ChannelNameTopFrontCenter 
ChannelNameTopCenter 
ChannelNameTopBackLeft 
ChannelNameTopBackRight 
ChannelNameTopSideLeft 
ChannelNameTopSideRight 
ChannelNameTopBackCenter 
ChannelNameBottomFrontCenter 
ChannelNameBottomFrontLeft 
ChannelNameBottomFrontRight 

Definition at line 215 of file Types.h.

216 {
217  // Use to mark end of list
218  ChannelNameEOL = -1,
219  // The default channel assignment
221  // From this point, the channels follow the 22.2 surround sound format
ChannelName
Definition: Types.h:215
enum ChannelName * ChannelNames
enum sampleFormat : unsigned
Enumerator
int16Sample 
int24Sample 
floatSample 

Definition at line 188 of file Types.h.

188  : unsigned
189 {
190  int16Sample = 0x00020001,
191  int24Sample = 0x00040001,
192  floatSample = 0x0004000F
193 };

Function Documentation

size_t limitSampleBufferSize ( size_t  bufferSize,
sampleCount  limit 
)
inline

Definition at line 178 of file Types.h.

References min().

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), CompareAudioCommand::Apply(), EffectAutoDuck::ApplyDuckFade(), VoiceKey::CalibrateNoise(), Sequence::Delete(), WaveTrack::Disjoin(), AudioIO::FillBuffers(), BlockGenerator::GenerateTrack(), NyquistEffect::GetCallback(), WaveTrack::GetEnvelopeValues(), Sequence::GetMinMax(), Sequence::GetRMS(), PCMImportFileHandle::Import(), FLACImportFileHandle::Import(), FFmpegImportFileHandle::Import(), ImportRaw(), Mixer::MixSameRate(), Mixer::MixVariableRates(), VoiceKey::OffBackward(), VoiceKey::OffForward(), VoiceKey::OnBackward(), VoiceKey::OnForward(), EffectSBSMS::Process(), EffectAutoDuck::Process(), VampEffect::Process(), EffectDtmf::ProcessBlock(), EffectSimpleMono::ProcessOne(), EffectStereoToMono::ProcessOne(), EffectFindClipping::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectNormalize::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectEqualization::ProcessOne(), EffectNoiseReduction::Worker::ProcessOne(), EffectReverse::ProcessOneClip(), Effect::ProcessTrack(), WaveClip::Resample(), resampleCB(), Sequence::SetSamples(), SelectHandle::StartSnappingFreqSelection(), VoiceKey::TestDirectionChanges(), VoiceKey::TestEnergy(), and VoiceKey::TestSignChanges().

179 {
180  return
181  std::min( sampleCount( bufferSize ), std::max( sampleCount(0), limit ) )
182  .as_size_t();
183 }
int min(int a, int b)
bool operator!= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 123 of file Types.h.

124 {
125  return !(a == b);
126 }
sampleCount operator% ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 168 of file Types.h.

169 {
170  return sampleCount{ a } %= b;
171 }
sampleCount operator* ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 158 of file Types.h.

159 {
160  return sampleCount{ a } *= b;
161 }
sampleCount operator+ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 148 of file Types.h.

149 {
150  return sampleCount{ a } += b;
151 }
sampleCount operator- ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 153 of file Types.h.

154 {
155  return sampleCount{ a } -= b;
156 }
sampleCount operator/ ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 163 of file Types.h.

164 {
165  return sampleCount{ a } /= b;
166 }
bool operator< ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 128 of file Types.h.

References sampleCount::as_long_long().

129 {
130  return a.as_long_long() < b.as_long_long();
131 }
long long as_long_long() const
Definition: Types.h:90
bool operator<= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 143 of file Types.h.

144 {
145  return !(b < a);
146 }
bool operator== ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 118 of file Types.h.

References sampleCount::as_long_long().

119 {
120  return a.as_long_long() == b.as_long_long();
121 }
long long as_long_long() const
Definition: Types.h:90
bool operator> ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 138 of file Types.h.

139 {
140  return b < a;
141 }
bool operator>= ( sampleCount  a,
sampleCount  b 
)
inline

Definition at line 133 of file Types.h.

134 {
135  return !(a < b);
136 }