Skip to content

Commit

Permalink
Add method for registering multiple audio source managers in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Jun 5, 2024
1 parent 8da0444 commit 83fc16c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ public interface AudioPlayerManager {
*/
void registerSourceManager(AudioSourceManager sourceManager);

/**
* Same as {@link #registerSourceManager(AudioSourceManager)} but registers multiple in one call.
* @param sourceManagers The source managers to register, which will be used for subsequent loadItem calls
*/
default void registerSourceManagers(AudioSourceManager... sourceManagers) {
for (AudioSourceManager sourceManager : sourceManagers) {
registerSourceManager(sourceManager);
}
}

/**
* Shortcut for accessing a source manager of a certain class.
*
Expand Down

0 comments on commit 83fc16c

Please sign in to comment.