Flushes and closes the file.
Flushes and closes the file. As opposed
to close()
, this does not
throw any exceptions but simply ignores any errors.
#close()
Flushes and closes the file
Flushes and closes the file
java.io.IOException
if an error occurs during buffer flush
or closing the file.
Copies sample frames from a source sound file
to a target file (either another sound file
or any other class implementing the
InterleavedStreamFile
interface).
Copies sample frames from a source sound file
to a target file (either another sound file
or any other class implementing the
InterleavedStreamFile
interface).
Both files must have the same number of channels.
to file to copy to from this audio file
the number of frames to copy. Reading and writing begins at the current positions of both files.
java.io.IOException
if a read or writer error occurs
Returns the underlying File
if it was
provided to the AudioFile
constructor.
Returns the underlying File
if it was
provided to the AudioFile
constructor.
For an AudioFile
created from an InputStream
this will return None
.
Flushes pending buffer content, and updates the sound file header information (i.e.
Flushes pending buffer content, and updates the sound file header information (i.e. numFrames fields). Usually you will not have to call this method directly, unless you pause writing for some time and want the file information to appear as accurate as possible.
Returns the number of frames in the file.
Returns the number of frames in the file.
the number of sample frames in the file. includes pending buffer content
java.io.IOException
this is never thrown
but declared as of the InterleavedStreamFile
interface
Returns the current file pointer in sample frames
Returns the current file pointer in sample frames
the sample frame index which is the off for the next reader or writer operation.
java.io.IOException
when the position cannot be queried
Reads sample frames from the current position
Reads sample frames from the current position
buffer to hold the frames reader from hard-disc. the samples will be de-interleaved such that data[0][] holds the first channel, data[1][] holds the second channel etc. ; it is allowed to have null arrays in the data (e.g. data[0] == null), in which case these channels are skipped when reading
off in the buffer in sample frames, such that he first frame of the first channel will be placed in data[0][off] etc.
number of continuous frames to reader.
java.io.IOException
if a reader error or end-of-file occurs.
Moves the file pointer to a specific frame.
Moves the file pointer to a specific frame.
the sample frame which should be the new file position. this is really the sample index and not the physical file pointer.
java.io.IOException
when a seek error occurs or you try to
seek past the file's end.
Returns a description of the audio file's specification.
Writes sample frames to the file starting at the current position.
Writes sample frames to the file starting at the current position.
buffer holding the frames to writer to hard-disc. the samples must be de-interleaved such that data[0][] holds the first channel, data[1][] holds the second channel etc.
off in the buffer in sample frames, such that he first frame of the first channel will be reader from data[0][off] etc.
number of continuous frames to writer.
java.io.IOException
if a writer error occurs.
Convenience method: Returns the number of channels in the file.
Convenience method: Returns the number of channels
in the file. Same as spec.numChannels
.
the number of channels