net.minecraft.client.audio

## Class SoundPool

- java.lang.Object
- - net.minecraft.client.audio.SoundPool

-     public class SoundPool
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `isGetRandomSound`
    `int` | `numberOfSoundPoolEntries` The number of soundPoolEntry's.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoundPool()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SoundPoolEntry` | `addSound(String par1Str, File par2File)` Adds a sound to this sound pool.
    `SoundPoolEntry` | `addSound(String par1Str, URL url)` URL version of addSound, as the back-end sound engine has full support for various types of URLs
    `SoundPoolEntry` | `getRandomSound()` Gets a random SoundPoolEntry.
    `SoundPoolEntry` | `getRandomSoundFromSoundPool(String par1Str)` gets a random sound from the specified (by name, can be sound/newsound/streaming/music/newmusic) sound pool.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### numberOfSoundPoolEntries

          public int numberOfSoundPoolEntries

      The number of soundPoolEntry's. This value is computed but never used (should be equal to allSoundPoolEntries.size()).

    - #### isGetRandomSound

          public boolean isGetRandomSound

  - ### Constructor Detail

    - #### SoundPool

          public SoundPool()

  - ### Method Detail

    - #### addSound

          public SoundPoolEntry addSound(String par1Str,
                                File par2File)

      Adds a sound to this sound pool.

    - #### addSound

          public SoundPoolEntry addSound(String par1Str,
                                URL url)

      URL version of addSound, as the back-end sound engine has full support for various types of URLs
      Parameters:
        `par1Str` - The name of the sound to add
        `url` - The url of the sound resource
      Returns:
        A SoundPoolEntry for the newly added sound

    - #### getRandomSoundFromSoundPool

          public SoundPoolEntry getRandomSoundFromSoundPool(String par1Str)

      gets a random sound from the specified (by name, can be sound/newsound/streaming/music/newmusic) sound pool.

    - #### getRandomSound

          public SoundPoolEntry getRandomSound()

      Gets a random SoundPoolEntry.