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,
sizeof (
int) * (
size_t)
silence);
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) };
181 convertFixedToFloat (
dests, 2, numSamples);
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);
Holds a resizable array of primitive or copy-by-value objects.
Represents a set of audio channel types.
static AudioChannelSet JUCE_CALLTYPE canonicalChannelSet(int numChannels)
Create a canonical channel set for a given number of channels.
Represents a local file or directory.
static void JUCE_CALLTYPE convertFixedToFloat(float *dest, const int *src, float multiplier, int numValues) noexcept
Converts a stream of integers to floats, multiplying each one by the given multiplier.
static Range< float > JUCE_CALLTYPE findMinAndMax(const float *src, int numValues) noexcept
Finds the minimum and maximum values in the given array.
Maps a file into virtual memory for easy reading and/or writing.
@ readOnly
Indicates that the memory can only be read.
static Range findMinAndMax(const ValueType *values, int numValues) noexcept
Scans an array of values for its min and max, and returns these as a Range.