Browse Source

Minor docs change, and addition to AudioThumbnail.

tags/2021-05-28
jules 12 years ago
parent
commit
904e54660f
3 changed files with 11 additions and 0 deletions
  1. +3
    -0
      modules/juce_audio_processors/processors/juce_AudioPlayHead.h
  2. +5
    -0
      modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp
  3. +3
    -0
      modules/juce_audio_utils/gui/juce_AudioThumbnail.h

+ 3
- 0
modules/juce_audio_processors/processors/juce_AudioPlayHead.h View File

@@ -133,6 +133,9 @@ public:
//==============================================================================
/** Fills-in the given structure with details about the transport's
position at the start of the current processing block.
This method must ONLY be called from within your AudioProcessor::processBlock()
method. Calling it at any other time will probably cause a nasty crash.
*/
virtual bool getCurrentPosition (CurrentPositionInfo& result) = 0;
};


+ 5
- 0
modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp View File

@@ -740,6 +740,11 @@ bool AudioThumbnail::isFullyLoaded() const noexcept
return numSamplesFinished >= totalSamples - samplesPerThumbSample;
}
double AudioThumbnail::getProportionComplete() const noexcept
{
return jlimit (0.0, 1.0, numSamplesFinished / (double) totalSamples);
}
int64 AudioThumbnail::getNumSamplesFinished() const noexcept
{
return numSamplesFinished;


+ 3
- 0
modules/juce_audio_utils/gui/juce_AudioThumbnail.h View File

@@ -168,6 +168,9 @@ public:
/** Returns true if the low res preview is fully generated. */
bool isFullyLoaded() const noexcept;
/** Returns a value between 0 and 1 to indicate the progress towards loading the entire file. */
double getProportionComplete() const noexcept;
/** Returns the number of samples that have been set in the thumbnail. */
int64 getNumSamplesFinished() const noexcept;


Loading…
Cancel
Save