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

## toxi.audio
Class MultiTimbralManager

    java.lang.Object
      toxi.audio.MultiTimbralManager

    public class MultiTimbralManager

extends java.lang.Object

Implements a manager to play a number of shared samples in a multitimbral manner without interrupting/restarting the playback of currently playing sources. This is different to the default JOAL way of accessing sources directly. The manager is keeping track of active sources and will attempt to assign free ones for newly requested playbacks. If all voices are active, the oldest one will be stopped and used as the newly requested voice.

Constructor Summary
`MultiTimbralManager(JOALUtil liboal, int num)`

Method Summary
`void` | `debug()` Uses the class' logger to print out status information about the current usage of the managed audio sources.
`AudioSource` | `getNextVoice()` Attempts to find an available, currently unused `AudioSource` instance which can then be configured and played by the client application.
`boolean[]` | `getUsage()` Produces an array of status flags of used voices.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiTimbralManager

    public MultiTimbralManager(JOALUtil liboal,
                               int num)

Method Detail

### debug

    public void debug()

  Uses the class' logger to print out status information about the current usage of the managed audio sources.

### getNextVoice

    public AudioSource getNextVoice()

  Attempts to find an available, currently unused `AudioSource` instance which can then be configured and played by the client application. If no free source is available the oldest playing one will be stopped and returned as free.

  Returns:
    a free AudioSource instance

### getUsage

    public boolean[] getUsage()

  Produces an array of status flags of used voices. Elements set to true indicate the voice is currently active/playing.

  Returns:
    boolean array

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