public class VorbisFile extends Object implements OggAudioStream, OggAudioHeaders, Closeable
Constructor and Description |
---|
VorbisFile(File f)
Opens the given file for reading
|
VorbisFile(OggFile ogg)
Opens the given file for reading
|
VorbisFile(OggPacketReader r)
Loads a Vorbis File from the given packet reader.
|
VorbisFile(OutputStream out)
Opens for writing.
|
VorbisFile(OutputStream out,
int sid,
VorbisInfo info,
VorbisComments comments,
VorbisSetup setup)
Opens for writing, based on the settings
from a pre-read file, with a specific
Steam ID (SID).
|
VorbisFile(OutputStream out,
VorbisInfo info,
VorbisComments comments,
VorbisSetup setup)
Opens for writing, based on the settings
from a pre-read file.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
In Reading mode, will close the underlying ogg
file and free its resources.
|
VorbisComments |
getComment() |
VorbisInfo |
getInfo() |
VorbisAudioData |
getNextAudioPacket()
Returns the next
OggStreamAudioData packet in the
stream, or null if no more remain |
OggFile |
getOggFile()
Returns the underlying Ogg File instance
|
VorbisSetup |
getSetup() |
int |
getSid()
Returns the Ogg Stream ID
|
VorbisComments |
getTags() |
OggStreamIdentifier.OggStreamType |
getType()
This is a Vorbis file
|
void |
skipToGranule(long granulePosition)
Skips the audio data to the next packet with a granule
of at least the given granule position.
|
void |
writeAudioData(VorbisAudioData data)
Buffers the given audio ready for writing
out.
|
public VorbisFile(File f) throws IOException, FileNotFoundException
IOException
FileNotFoundException
public VorbisFile(OggFile ogg) throws IOException
IOException
public VorbisFile(OggPacketReader r) throws IOException
IOException
public VorbisFile(OutputStream out)
public VorbisFile(OutputStream out, VorbisInfo info, VorbisComments comments, VorbisSetup setup)
public VorbisFile(OutputStream out, int sid, VorbisInfo info, VorbisComments comments, VorbisSetup setup)
public VorbisAudioData getNextAudioPacket() throws IOException
OggAudioStream
OggStreamAudioData
packet in the
stream, or null if no more remaingetNextAudioPacket
in interface OggAudioStream
IOException
public void skipToGranule(long granulePosition) throws IOException
skipToGranule
in interface OggAudioStream
IOException
public int getSid()
getSid
in interface OggAudioHeaders
public OggStreamIdentifier.OggStreamType getType()
getType
in interface OggAudioHeaders
public VorbisInfo getInfo()
getInfo
in interface OggAudioHeaders
public VorbisComments getComment()
public VorbisComments getTags()
getTags
in interface OggAudioHeaders
public VorbisSetup getSetup()
getSetup
in interface OggAudioHeaders
public void writeAudioData(VorbisAudioData data)
close()
to do that,
because we assume you'll still be populating
the Info/Comment/Setup objectspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public OggFile getOggFile()
Copyright © 2015. All rights reserved.