public class WavHeader extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WavHeader.FmtChunk |
static class |
WavHeader.FmtChunkExtended |
Modifier and Type | Field and Description |
---|---|
String |
chunkId |
int |
chunkSize |
int |
dataOffset |
long |
dataSize |
WavHeader.FmtChunk |
fmt |
String |
format |
static int |
WAV_HEADER_SIZE |
Constructor and Description |
---|
WavHeader(String chunkId,
int chunkSize,
String format,
WavHeader.FmtChunk fmt,
int dataOffset,
long dataSize) |
Modifier and Type | Method and Description |
---|---|
static long |
calcDataSize(int numChannels,
int bytesPerSample,
long samples) |
static WavHeader |
copyWithChannels(WavHeader header,
int channels) |
static WavHeader |
copyWithRate(WavHeader header,
int rate) |
static WavHeader |
create(AudioFormat af,
int size) |
static WavHeader |
createWavHeader(AudioFormat format,
int samples)
Creates wav header for the specified audio format
|
static WavHeader |
emptyWavHeader() |
ChannelLabel[] |
getChannelLabels() |
AudioFormat |
getFormat() |
static WavHeader |
mono48k(long samples) |
static WavHeader |
multiChannelWav(WavHeader[] headers)
Takes single channel wavs as input produces multi channel wav
|
static WavHeader |
multiChannelWavFromFiles(File[] files) |
static WavHeader |
read(File file) |
static WavHeader |
readChannel(ReadableByteChannel _in) |
static WavHeader |
stereo48k() |
static WavHeader |
stereo48kWithSamples(long samples) |
void |
write(WritableByteChannel out) |
public String chunkId
public int chunkSize
public String format
public WavHeader.FmtChunk fmt
public int dataOffset
public long dataSize
public static final int WAV_HEADER_SIZE
public WavHeader(String chunkId, int chunkSize, String format, WavHeader.FmtChunk fmt, int dataOffset, long dataSize)
public static WavHeader createWavHeader(AudioFormat format, int samples)
format
- samples
- public static WavHeader stereo48k()
public static WavHeader stereo48kWithSamples(long samples)
public static WavHeader mono48k(long samples)
public static WavHeader emptyWavHeader()
public static WavHeader read(File file) throws IOException
IOException
public static WavHeader readChannel(ReadableByteChannel _in) throws IOException
IOException
public static WavHeader multiChannelWavFromFiles(File[] files) throws IOException
IOException
public static WavHeader multiChannelWav(WavHeader[] headers)
public void write(WritableByteChannel out) throws IOException
IOException
public static long calcDataSize(int numChannels, int bytesPerSample, long samples)
public static WavHeader create(AudioFormat af, int size)
public ChannelLabel[] getChannelLabels()
public AudioFormat getFormat()
Copyright © 2019. All rights reserved.