org.kc7bfi.jflac.util
Class WavWriter

java.lang.Object
  extended by org.kc7bfi.jflac.util.WavWriter

public class WavWriter
extends Object

Utility class for writing WAV files.

Author:
kc7bfi

Constructor Summary
WavWriter(DataOutput os)
          The constructor.
WavWriter(DataOutput os, StreamInfo streamInfo)
          The constructor.
WavWriter(OutputStream os)
          The constructor.
WavWriter(OutputStream os, StreamInfo streamInfo)
          The constructor.
 
Method Summary
 void writeFrame(Frame frame, ChannelData[] channelData)
          Write a WAV frame record.
 void writeHeader()
          Write a WAV file header.
 void writeHeader(StreamInfo streamInfo)
          Write a WAV file header.
 void writePCM(ByteData space)
          Write the PCM data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WavWriter

public WavWriter(DataOutput os,
                 StreamInfo streamInfo)
The constructor.

Parameters:
os - The output sream
streamInfo - The FLAC stream info

WavWriter

public WavWriter(DataOutput os)
The constructor.

Parameters:
os - The output sream

WavWriter

public WavWriter(OutputStream os,
                 StreamInfo streamInfo)
The constructor.

Parameters:
os - The output sream
streamInfo - The FLAC stream info

WavWriter

public WavWriter(OutputStream os)
The constructor.

Parameters:
os - The output sream
Method Detail

writeHeader

public void writeHeader()
                 throws IOException
Write a WAV file header.

Throws:
IOException - Thrown if error writing to output string.

writeHeader

public void writeHeader(StreamInfo streamInfo)
                 throws IOException
Write a WAV file header.

Parameters:
streamInfo - The FLAC stream info
Throws:
IOException - Thrown if error writing to output string.

writeFrame

public void writeFrame(Frame frame,
                       ChannelData[] channelData)
                throws IOException
Write a WAV frame record.

Parameters:
frame - The FLAC frame
channelData - The decoded channel data
Throws:
IOException - Thrown if error writing to output channel

writePCM

public void writePCM(ByteData space)
              throws IOException
Write the PCM data.

Parameters:
space - The PCM data
Throws:
IOException - Thrown if error writing to file


Copyright © 2004-2011. All Rights Reserved.