Skip to content

Commit

Permalink
AudioUnitManager: Add short rationale to factory method
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Nov 26, 2024
1 parent 8262c36 commit fea4fb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/effects/backends/audiounit/audiounitmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class AudioUnitManager {
AudioUnitManager(const AudioUnitManager&) = delete;
AudioUnitManager& operator=(const AudioUnitManager&) = delete;

/// Creates a new `AudioUnitManager`, wrapped in a shared pointer. This
/// form of instantiation is enforced, since asynchronously instantiated
/// audio units may capture a pointer to the manager instance (that would be
/// unsafe if the manager is deinitialized to early, since the callback
/// would be left with a dangling pointer).
static AudioUnitManagerPointer create(
AVAudioUnitComponent* _Nullable component = nil,
AudioUnitInstantiationType instantiationType =
Expand Down

0 comments on commit fea4fb8

Please sign in to comment.