31 : input (
in), formatName (name)
40static void convertFixedToFloat (
int*
const* channels,
int numChannels,
int numSamples)
42 for (
int i = 0; i < numChannels; ++i)
43 if (
auto d = channels[i])
77 if (
auto d = destChannels[i])
78 zeromem (d, (
size_t)
silence *
sizeof (
int));
88 if (!
readSamples (
const_cast<int**
> (destChannels),
101 if (destChannels[i] !=
nullptr)
110 if (
auto d = destChannels[i])
116 if (
auto d = destChannels[i])
129 chans[
j] =
reinterpret_cast<int*
> (buffer->getWritePointer (
j, startSample));
145 jassert (buffer !=
nullptr);
154 int*
dests[2] = {
reinterpret_cast<int*
> (buffer->getWritePointer (0, startSample)),
155 reinterpret_cast<int*
> (
numTargetChannels > 1 ? buffer->getWritePointer (1, startSample) :
nullptr) };
174 read (chans, 2, readerStartSample, numSamples,
true);
177 if (numTargetChannels > 1 && (chans[0] ==
nullptr || chans[1] ==
nullptr))
178 memcpy (dests[1], dests[0], (
size_t) numSamples *
sizeof (
float));
181 convertFixedToFloat (dests, 2, numSamples);
183 else if (numTargetChannels <= 64)
186 readChannels (*
this, chans, buffer, startSample, numSamples,
192 readChannels (*
this,
chans, buffer, startSample, numSamples,
211 auto bufferSize = (
int) jmin (numSamples, (int64) 4096);
218 while (numSamples > 0)
220 auto numToDo = (
int) jmin (numSamples, (int64) bufferSize);
238 intRange.getEnd() / (
float) std::numeric_limits<int>::max());
241 results[i] =
isFirstBlock ? r : results[i].getUnionWith (r);
281 const int bufferSize = 4096;
301 int64 bufferStart = startSample;
317 bool matches =
false;
318 auto index = (
int) (startSample - bufferStart);
322 const float sample1 = std::abs (((
float*) tempBuffer[0]) [index]);
331 const float sample2 = std::abs (((
float*) tempBuffer[1]) [index]);
339 const int sample1 = std::abs (tempBuffer[0] [index]);
348 const int sample2 = std::abs (tempBuffer[1][index]);
394 int64 start, int64 length,
int frameSize)
396 dataChunkStart (start), dataLength (length), bytesPerFrame (
frameSize)
422 if (map->getData() ==
nullptr)
429 return map !=
nullptr;
432static int memoryReadDummyVariable;
436 if (map !=
nullptr && mappedSection.contains (
sample))
437 memoryReadDummyVariable += *(
char*) sampleToPointer (
sample);
static AudioChannelSet JUCE_CALLTYPE canonicalChannelSet(int numChannels)
static void JUCE_CALLTYPE convertFixedToFloat(float *dest, const int *src, float multiplier, int numValues) noexcept
static Range< float > JUCE_CALLTYPE findMinAndMax(const float *src, int numValues) noexcept
static Range findMinAndMax(const ValueType *values, int numValues) noexcept