WavAudioFormat

eu.joaocosta.minart.audio.sound.wav.WavAudioFormat
See theWavAudioFormat companion object
final class WavAudioFormat[R, W](val byteReader: ByteReader[R], val byteWriter: ByteWriter[W], val bitRate: Int) extends WavAudioReader[R] with WavAudioWriter[W]

Audio format WAV files.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def fromByteArray(data: Array[Byte]): Either[String, AudioClip]

Loads an audio clip from a byte array.

Loads an audio clip from a byte array.

Attributes

data

Byte array

Returns:

Either a AudioClip with the audio data or an error string

Inherited from:
AudioClipReader
def loadClip(is: InputStream): Either[String, AudioClip]

Loads an audio clip from an InputStream.

Loads an audio clip from an InputStream.

Attributes

is

InputStream with the audio clip data

Returns:

Either a AudioClip with the audio clip data or an error string

Inherited from:
WavAudioReader
def loadClip(resource: Resource): Try[Either[String, AudioClip]]

Loads an audio clip from a Resource.

Loads an audio clip from a Resource.

Attributes

resource

Resource with the audio clip data

Returns:

Either a AudioClip with the audio clip data or an error string, inside a Try capturing the IO exceptions

Inherited from:
AudioClipReader
def storeClip(clip: AudioClip, os: OutputStream): Either[String, Unit]

Stores an audio clip to an OutputStream.

Stores an audio clip to an OutputStream.

Attributes

clip

AudioClip to store

os

OutputStream where to store the data

Returns:

Either unit or an error string

Inherited from:
WavAudioWriter
def storeClip(clip: AudioClip, resource: Resource): Try[Either[String, Unit]]

Stores an audio clip to a Resource.

Stores an audio clip to a Resource.

Attributes

clip

AudioCLip to store

resource

Resource where to store the data

Returns:

Either unit or an error string, inside a Try capturing the IO exceptions

Inherited from:
AudioClipWriter
def toByteArray(clip: AudioClip): Either[String, Array[Byte]]

Returns the audio clip data as a byte array.

Returns the audio clip data as a byte array.

Attributes

clip

AudioClip to convert

Returns:

Either an array with the clip data or an error string

Inherited from:
AudioClipWriter

Concrete fields

val byteReader: ByteReader[R]
val byteWriter: ByteWriter[W]

Inherited fields

Attributes

Inherited from:
WavAudioWriter

Attributes

Inherited from:
WavAudioWriter