Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class SoundPool

    java.lang.Object
      net.minecraft.src.SoundPool

    public class SoundPool

extends Object

Field Summary
`boolean` | `isGetRandomSound`
`int` | `numberOfSoundPoolEntries` The number of soundPoolEntry's.

Constructor Summary
`SoundPool()`

Method Summary
`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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD