|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiph.speex.AudioFileWriter
public abstract class AudioFileWriter
Abstract Class that defines an Audio File Writer.
| Constructor Summary | |
|---|---|
AudioFileWriter()
|
|
| Method Summary | |
|---|---|
static byte[] |
buildOggPageHeader(int headerType,
long granulepos,
int streamSerialNumber,
int pageCount,
int packetCount,
byte[] packetSizes)
Builds and returns an Ogg Page Header. |
static byte[] |
buildSpeexComment(java.lang.String comment)
Builds and returns a Speex Comment. |
static byte[] |
buildSpeexHeader(int sampleRate,
int mode,
int channels,
boolean vbr,
int nframes)
Builds a Speex Header. |
abstract void |
close()
Closes the output file. |
abstract void |
open(java.io.File file)
Open the output file. |
abstract void |
open(java.lang.String filename)
Open the output file. |
abstract void |
writeHeader(java.lang.String comment)
Writes the header pages that start the Ogg Speex file. |
static void |
writeInt(byte[] data,
int offset,
int v)
Writes a Little-endian int. |
static void |
writeInt(java.io.DataOutput out,
int v)
Writes a Little-endian int. |
static void |
writeInt(java.io.OutputStream os,
int v)
Writes a Little-endian int. |
static void |
writeLong(byte[] data,
int offset,
long v)
Writes a Little-endian long. |
static void |
writeLong(java.io.OutputStream os,
long v)
Writes a Little-endian long. |
static int |
writeOggPageHeader(byte[] buf,
int offset,
int headerType,
long granulepos,
int streamSerialNumber,
int pageCount,
int packetCount,
byte[] packetSizes)
Writes an Ogg Page Header to the given byte array. |
abstract void |
writePacket(byte[] data,
int offset,
int len)
Writes a packet of audio. |
static void |
writeShort(byte[] data,
int offset,
int v)
Writes a Little-endian short. |
static void |
writeShort(java.io.DataOutput out,
short v)
Writes a Little-endian short. |
static void |
writeShort(java.io.OutputStream os,
short v)
Writes a Little-endian short. |
static int |
writeSpeexComment(byte[] buf,
int offset,
java.lang.String comment)
Writes a Speex Comment to the given byte array. |
static int |
writeSpeexHeader(byte[] buf,
int offset,
int sampleRate,
int mode,
int channels,
boolean vbr,
int nframes)
Writes a Speex Header to the given byte array. |
static void |
writeString(byte[] data,
int offset,
java.lang.String v)
Writes a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioFileWriter()
| Method Detail |
|---|
public abstract void close()
throws java.io.IOException
java.io.IOException - if there was an exception closing the Audio Writer.
public abstract void open(java.io.File file)
throws java.io.IOException
file - - file to open.
java.io.IOException - if there was an exception opening the Audio Writer.
public abstract void open(java.lang.String filename)
throws java.io.IOException
filename - - file to open.
java.io.IOException - if there was an exception opening the Audio Writer.
public abstract void writeHeader(java.lang.String comment)
throws java.io.IOException
comment - description to be included in the header.
java.io.IOException
public abstract void writePacket(byte[] data,
int offset,
int len)
throws java.io.IOException
data - audio dataoffset - the offset from which to start reading the data.len - the length of data to read.
java.io.IOException
public static int writeOggPageHeader(byte[] buf,
int offset,
int headerType,
long granulepos,
int streamSerialNumber,
int pageCount,
int packetCount,
byte[] packetSizes)
buf - the buffer to write to.offset - the from which to start writing.headerType - the header type flag
(0=normal, 2=bos: beginning of stream, 4=eos: end of stream).granulepos - the absolute granule position.streamSerialNumber - pageCount - packetCount - packetSizes -
public static byte[] buildOggPageHeader(int headerType,
long granulepos,
int streamSerialNumber,
int pageCount,
int packetCount,
byte[] packetSizes)
headerType - the header type flag
(0=normal, 2=bos: beginning of stream, 4=eos: end of stream).granulepos - the absolute granule position.streamSerialNumber - pageCount - packetCount - packetSizes -
public static int writeSpeexHeader(byte[] buf,
int offset,
int sampleRate,
int mode,
int channels,
boolean vbr,
int nframes)
buf - the buffer to write to.offset - the from which to start writing.sampleRate - mode - channels - vbr - nframes -
public static byte[] buildSpeexHeader(int sampleRate,
int mode,
int channels,
boolean vbr,
int nframes)
sampleRate - mode - channels - vbr - nframes -
public static int writeSpeexComment(byte[] buf,
int offset,
java.lang.String comment)
buf - the buffer to write to.offset - the from which to start writing.comment - the comment.
public static byte[] buildSpeexComment(java.lang.String comment)
comment - the comment.
public static void writeShort(java.io.DataOutput out,
short v)
throws java.io.IOException
out - the data output to write to.v - value to write.
java.io.IOException
public static void writeInt(java.io.DataOutput out,
int v)
throws java.io.IOException
out - the data output to write to.v - value to write.
java.io.IOException
public static void writeShort(java.io.OutputStream os,
short v)
throws java.io.IOException
os - - the output stream to write to.v - - the value to write.
java.io.IOException
public static void writeInt(java.io.OutputStream os,
int v)
throws java.io.IOException
os - - the output stream to write to.v - - the value to write.
java.io.IOException
public static void writeLong(java.io.OutputStream os,
long v)
throws java.io.IOException
os - - the output stream to write to.v - - the value to write.
java.io.IOException
public static void writeShort(byte[] data,
int offset,
int v)
data - the array into which the data should be written.offset - the offset from which to start writing in the array.v - the value to write.
public static void writeInt(byte[] data,
int offset,
int v)
data - the array into which the data should be written.offset - the offset from which to start writing in the array.v - the value to write.
public static void writeLong(byte[] data,
int offset,
long v)
data - the array into which the data should be written.offset - the offset from which to start writing in the array.v - the value to write.
public static void writeString(byte[] data,
int offset,
java.lang.String v)
data - the array into which the data should be written.offset - the offset from which to start writing in the array.v - the value to write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||