org.jcodec.codecs.wav
Class WavHeader

java.lang.Object
  extended by org.jcodec.codecs.wav.WavHeader

public class WavHeader
extends Object

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License

Author:
The JCodec project

Nested Class Summary
static class WavHeader.FmtChunk
           
static class WavHeader.FmtChunkExtended
           
 
Field Summary
 String chunkId
           
 int chunkSize
           
 int dataOffset
           
 long dataSize
           
 WavHeader.FmtChunk fmt
           
 String format
           
static int WAV_HEADER_SIZE
           
 
Constructor Summary
WavHeader(String chunkId, int chunkSize, String format, WavHeader.FmtChunk fmt, int dataOffset, long dataSize)
           
WavHeader(WavHeader header)
           
WavHeader(WavHeader header, int rate)
           
 
Method Summary
static long calcDataSize(int numChannels, int bytesPerSample, long samples)
           
static WavHeader create(AudioFormat af, int size)
           
static WavHeader emptyWavHeader()
           
 ChannelLabel[] getChannelLabels()
           
static WavHeader mono48k(long samples)
           
static WavHeader multiChannelWav(File... wavs)
           
static WavHeader multiChannelWav(List<File> wavs)
           
static WavHeader multiChannelWav(WavHeader... wavs)
          Takes single channel wavs as input produces multi channel wav
static WavHeader read(File file)
           
static WavHeader read(InputStream in)
           
static WavHeader stereo48k()
           
static WavHeader stereo48k(long samples)
           
 void write(OutputStream out)
           
 void writeExtended(OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chunkId

public String chunkId

chunkSize

public int chunkSize

format

public String format

fmt

public WavHeader.FmtChunk fmt

dataOffset

public int dataOffset

dataSize

public long dataSize

WAV_HEADER_SIZE

public static final int WAV_HEADER_SIZE
See Also:
Constant Field Values
Constructor Detail

WavHeader

public WavHeader(String chunkId,
                 int chunkSize,
                 String format,
                 WavHeader.FmtChunk fmt,
                 int dataOffset,
                 long dataSize)

WavHeader

public WavHeader(WavHeader header)

WavHeader

public WavHeader(WavHeader header,
                 int rate)
Method Detail

stereo48k

public static WavHeader stereo48k()

stereo48k

public static WavHeader stereo48k(long samples)

mono48k

public static WavHeader mono48k(long samples)

emptyWavHeader

public static WavHeader emptyWavHeader()

read

public static WavHeader read(File file)
                      throws IOException
Throws:
IOException

read

public static WavHeader read(InputStream in)
                      throws IOException
Throws:
IOException

multiChannelWav

public static WavHeader multiChannelWav(List<File> wavs)
                                 throws IOException
Throws:
IOException

multiChannelWav

public static WavHeader multiChannelWav(File... wavs)
                                 throws IOException
Throws:
IOException

multiChannelWav

public static WavHeader multiChannelWav(WavHeader... wavs)
Takes single channel wavs as input produces multi channel wav


write

public void write(OutputStream out)
           throws IOException
Throws:
IOException

writeExtended

public void writeExtended(OutputStream out)
                   throws IOException
Throws:
IOException

calcDataSize

public static long calcDataSize(int numChannels,
                                int bytesPerSample,
                                long samples)

create

public static WavHeader create(AudioFormat af,
                               int size)

getChannelLabels

public ChannelLabel[] getChannelLabels()


Copyright © 2013. All Rights Reserved.