30 : input (
in), formatName (name)
39static void convertFixedToFloat (
int*
const* channels,
int numChannels,
int numSamples)
41 constexpr auto scaleFactor = 1.0f /
static_cast<float> (0x7fffffff);
43 for (
int i = 0; i < numChannels; ++i)
44 if (
auto d = channels[i])
45 FloatVectorOperations::convertFixedToFloat (
reinterpret_cast<float*
> (d), d,
scaleFactor, numSamples);
78 if (
auto d = destChannels[i])
79 zeromem (d, (
size_t)
silence *
sizeof (
int));
102 if (destChannels[i] !=
nullptr)
111 if (
auto d = destChannels[i])
117 if (
auto d = destChannels[i])
130 chans[
j] =
reinterpret_cast<int*
> (buffer->getWritePointer (
j, startSample));
149 jassert (buffer !=
nullptr);
159 int*
dests[2] = {
reinterpret_cast<int*
> (buffer->getWritePointer (0, startSample)),
160 reinterpret_cast<int*
> (
numTargetChannels > 1 ? buffer->getWritePointer (1, startSample) :
nullptr) };
179 if (!
read (chans, 2, readerStartSample, numSamples,
true))
183 if (numTargetChannels > 1
184 && (chans[0] ==
nullptr || chans[1] ==
nullptr)
185 && (dests[0] !=
nullptr && dests[1] !=
nullptr))
187 memcpy (dests[1], dests[0], (
size_t) numSamples *
sizeof (
float));
191 convertFixedToFloat (
dests, 2, numSamples);
199 return readChannels (*
this,
chans, buffer, startSample, numSamples,
203 HeapBlock<int*> chans (numTargetChannels + 1);
205 return readChannels (*
this, chans, buffer, startSample, numSamples,
222 auto bufferSize = (
int) jmin (numSamples, (int64) 4096);
229 while (numSamples > 0)
231 auto numToDo = (
int) jmin (numSamples, (int64) bufferSize);
249 (
float)
intRange.getEnd() / (
float) std::numeric_limits<int>::max());
252 results[i] =
isFirstBlock ? r : results[i].getUnionWith (r);
292 const int bufferSize = 4096;
328 bool matches =
false;
333 const float sample1 = std::abs (((
float*) tempBuffer[0]) [index]);
342 const float sample2 = std::abs (((
float*) tempBuffer[1]) [index]);
350 const int sample1 = std::abs (tempBuffer[0] [index]);
359 const int sample2 = std::abs (tempBuffer[1][index]);
405 int64 start, int64 length,
int frameSize)
407 dataChunkStart (start), dataLength (length), bytesPerFrame (
frameSize)
433 if (map->getData() ==
nullptr)
440 return map !=
nullptr;
443static int memoryReadDummyVariable;
447 if (map !=
nullptr && mappedSection.contains (
sample))
448 memoryReadDummyVariable += *(
char*) sampleToPointer (
sample);
static AudioChannelSet JUCE_CALLTYPE canonicalChannelSet(int numChannels)
static Range findMinAndMax(const ValueType *values, Integral numValues) noexcept