mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
Improved a couple of comments.
This commit is contained in:
parent
a4594e55e7
commit
2bccce2f6f
2 changed files with 14 additions and 6 deletions
|
|
@ -130,8 +130,10 @@ 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.
|
||||
You can ONLY call this from your processBlock() method! Calling it at other
|
||||
times will produce undefined behaviour, as the host may not have any context
|
||||
in which a time would make sense, and some hosts will almost certainly have
|
||||
multithreading issues if it's not called on the audio thread.
|
||||
*/
|
||||
virtual bool getCurrentPosition (CurrentPositionInfo& result) = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -140,11 +140,17 @@ public:
|
|||
/** Returns the current AudioPlayHead object that should be used to find
|
||||
out the state and position of the playhead.
|
||||
|
||||
You can call this from your processBlock() method, and use the AudioPlayHead
|
||||
object to get the details about the time of the start of the block currently
|
||||
being processed.
|
||||
You can ONLY call this from your processBlock() method! Calling it at other
|
||||
times will produce undefined behaviour, as the host may not have any context
|
||||
in which a time would make sense, and some hosts will almost certainly have
|
||||
multithreading issues if it's not called on the audio thread.
|
||||
|
||||
If the host hasn't supplied a playhead object, this will return nullptr.
|
||||
The AudioPlayHead object that is returned can be used to get the details about
|
||||
the time of the start of the block currently being processed. But do not
|
||||
store this pointer or use it outside of the current audio callback, because
|
||||
the host may delete or re-use it.
|
||||
|
||||
If the host can't or won't provide any time info, this will return nullptr.
|
||||
*/
|
||||
AudioPlayHead* getPlayHead() const noexcept { return playHead; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue