All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.kaleidox.vban.model.data.AudioFrame Maven / Gradle / Ivy

Go to download

Java 7 compatible Library for communicating with the VB-Audio VBAN interface

The newest version!
package de.kaleidox.vban.model.data;

import de.kaleidox.util.model.ByteArray;

/**
 * A class representing any frame of audio data received via VBAN.
 */
public class AudioFrame implements ByteArray {
    private final byte[] audioBytes;

    /**
     * Private constructor.
     * Create {@link AudioFrame}s with {@link #fromBytes(byte[])}.
     *
     * @param bytes The audio data bytes of this frame.
     */
    private AudioFrame(byte[] bytes) {
        audioBytes = bytes;
    }

    @Override
    public byte[] getBytes() {
        return audioBytes;
    }

    /**
     * Used to create a new {@link AudioFrame}.
     *
     * @param bytes The audio data bytes of this frame.
     *
     * @return A new {@link AudioFrame}.
     */
    public static AudioFrame fromBytes(byte[] bytes) {
        return new AudioFrame(bytes);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy