94 bool read (
float*
const* destChannels,
int numDestChannels,
95 int64 startSampleInSource,
int numSamplesToRead);
135 bool read (
int*
const* destChannels,
137 int64 startSampleInSource,
138 int numSamplesToRead,
139 bool fillLeftoverChannelsWithCopies);
149 int startSampleInDestBuffer,
151 int64 readerStartSample,
152 bool useReaderLeftChan,
153 bool useReaderRightChan);
171 virtual void readMaxLevels (int64 startSample, int64 numSamples,
191 virtual void readMaxLevels (int64 startSample, int64 numSamples,
192 float& lowestLeft,
float& highestLeft,
193 float& lowestRight,
float& highestRight);
217 int64 searchForLevel (int64 startSample,
218 int64 numSamplesToSearch,
219 double magnitudeRangeMinimum,
220 double magnitudeRangeMaximum,
221 int minimumConsecutiveSamples);
226 double sampleRate = 0;
229 unsigned int bitsPerSample = 0;
232 int64 lengthInSamples = 0;
235 unsigned int numChannels = 0;
238 bool usesFloatingPointData =
false;
271 virtual bool readSamples (
int** destChannels,
273 int startOffsetInDestBuffer,
274 int64 startSampleInFile,
281 template <
class DestSampleType,
class SourceSampleType,
class SourceEndianness>
287 template <
typename TargetType>
288 static void read (TargetType*
const* destData,
int destOffset,
int numDestChannels,
289 const void* sourceData,
int numSourceChannels,
int numSamples) noexcept
291 for (
int i = 0; i < numDestChannels; ++i)
293 if (
void* targetChan = destData[i])
298 if (i < numSourceChannels)
299 dest.
convertSamples (
SourceType (addBytesToPointer (sourceData, i * SourceType::getBytesPerSample()), numSourceChannels), numSamples);
311 int startOffsetInDestBuffer, int64 startSampleInFile,
312 int& numSamples, int64 fileLengthInSamples)
314 jassert (destChannels !=
nullptr);
315 const int64 samplesAvailable = fileLengthInSamples - startSampleInFile;
317 if (samplesAvailable < numSamples)
319 for (
int i = numDestChannels; --i >= 0;)
320 if (destChannels[i] !=
nullptr)
321 zeromem (destChannels[i] + startOffsetInDestBuffer, (
size_t) numSamples *
sizeof (
int));
323 numSamples = (int) samplesAvailable;
Represents a set of audio channel types.
Used as a template parameter for AudioData::Pointer.
void clearSamples(int numSamples) const noexcept
Sets a number of samples to zero.
#define JUCE_API
This macro is added to all JUCE public class declarations.
void convertSamples(Pointer source, int numSamples) const noexcept
Writes a stream of samples into this pointer from another pointer.
A container for holding a set of strings which are keyed by another string.
A general-purpose range object, that simply represents any linear range with a start and end point...