Package voltage.core

# Class SamplerVoiceProgram.SampleInfo

java.lang.Object
voltage.core.SamplerVoiceProgram.SampleInfo

Enclosing class:
  `SamplerVoiceProgram`

public static class SamplerVoiceProgram.SampleInfo extends Object
A simple voice containing sample data, the buffer and sample rate.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `numChannels`
  `int`
  `numSamples`
  `double[]`
  `sampleData`
  `int`
  `sampleRate`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SampleInfo()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `Load16BitBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)`
  Load a 16 bit buffer.
  `void`
  `LoadDoubleBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)`
  Load a double buffer.
  `void`
  `LoadFloatBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)`
  Load a float buffer.

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

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

- ## Field Details

  - ### sampleData

    public double[] sampleData

  - ### numSamples

    public int numSamples

  - ### numChannels

    public int numChannels

  - ### sampleRate

    public int sampleRate

- ## Constructor Details

  - ### SampleInfo

    public SampleInfo()

- ## Method Details

  - ### Load16BitBuffer

    public void Load16BitBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)
    Load a 16 bit buffer.
    Parameters:
      `buffer` - a buffer of audio data.
      `numChannels` - the number of channels for this buffer.
      `sampleRate` - the sample rate for this data.
      `bLittleEndian` - details if this is little endian, ie: from a mac or from windows.

  - ### LoadFloatBuffer

    public void LoadFloatBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)
    Load a float buffer.
    Parameters:
      `buffer` - a buffer of audio data.
      `numChannels` - the number of channels for this buffer.
      `sampleRate` - the sample rate for this data.
      `bLittleEndian` - details if this is little endian, ie: from a mac or from windows.

  - ### LoadDoubleBuffer

    public void LoadDoubleBuffer(ByteBuffer buffer, int numChannels, int sampleRate, boolean bLittleEndian)
    Load a double buffer.
    Parameters:
      `buffer` - a buffer of audio data.
      `numChannels` - the number of channels for this buffer.
      `sampleRate` - the sample rate for this data.
      `bLittleEndian` - details if this is little endian, ie: from a mac or from windows.