trait AudioFile extends Channel
- Alphabetic
- By Inheritance
- AudioFile
- Channel
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
cleanUp(): Unit
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.- See also
#close()
-
abstract
def
close(): Unit
Flushes and closes the file
Flushes and closes the file
- Definition Classes
- AudioFile → Channel → Closeable → AutoCloseable
- Annotations
- @throws( classOf[IOException] )
- Exceptions thrown
java.io.IOExceptionif an error occurs during buffer flush or closing the file.
-
abstract
def
copyTo(target: AudioFile, numFrames: Long): AudioFile
Copies sample frames from a source sound file to a target file (either another sound file or any other class implementing the
InterleavedStreamFileinterface).Copies sample frames from a source sound file to a target file (either another sound file or any other class implementing the
InterleavedStreamFileinterface). Both files must have the same number of channels.- target
to file to copy to from this audio file
- numFrames
the number of frames to copy. Reading and writing begins at the current positions of both files.
- Annotations
- @throws( classOf[IOException] )
- Exceptions thrown
java.io.IOExceptionif a read or writer error occurs
-
abstract
def
file: Option[File]
Returns the underlying
Fileif it was provided to theAudioFileconstructor.Returns the underlying
Fileif it was provided to theAudioFileconstructor. For anAudioFilecreated from anInputStreamthis will returnNone. -
abstract
def
flush(): AudioFile
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.
-
abstract
def
isOpen(): Boolean
- Definition Classes
- Channel
- abstract def isReadable: Boolean
- abstract def isWritable: Boolean
-
abstract
def
numFrames: Long
Returns the number of frames in the file.
Returns the number of frames in the file.
- returns
the number of sample frames in the file. includes pending buffer content
- Exceptions thrown
java.io.IOExceptionthis is never thrown but declared as of theInterleavedStreamFileinterface
-
abstract
def
position: Long
Returns the current file pointer in sample frames
Returns the current file pointer in sample frames
- returns
the sample frame index which is the off for the next reader or writer operation.
- Exceptions thrown
java.io.IOExceptionwhen the position cannot be queried
-
abstract
def
read(data: Frames, off: Int, len: Int): AudioFile
Reads sample frames from the current position
Reads sample frames from the current position
- data
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
off in the buffer in sample frames, such that he first frame of the first channel will be placed in data[0][off] etc.
- len
number of continuous frames to reader.
- Annotations
- @throws( classOf[IOException] )
- Exceptions thrown
java.io.IOExceptionif a reader error or end-of-file occurs.
-
abstract
def
seek(frame: Long): AudioFile
Moves the file pointer to a specific frame.
Moves the file pointer to a specific frame.
- frame
the sample frame which should be the new file position. this is really the sample index and not the physical file pointer.
- Annotations
- @throws( classOf[IOException] )
- Exceptions thrown
java.io.IOExceptionwhen a seek error occurs or you try to seek past the file's end.
-
abstract
def
spec: AudioFileSpec
Returns a description of the audio file's specification.
-
abstract
def
write(data: Frames, off: Int, len: Int): AudioFile
Writes sample frames to the file starting at the current position.
Writes sample frames to the file starting at the current position.
- data
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
off in the buffer in sample frames, such that he first frame of the first channel will be reader from data[0][off] etc.
- len
number of continuous frames to writer.
- Annotations
- @throws( classOf[IOException] )
- Exceptions thrown
java.io.IOExceptionif a writer error occurs.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buffer(bufFrames: Int = 8192): Frames
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def fileType: AudioFileType
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
numChannels: Int
Convenience method: Returns the number of channels in the file.
Convenience method: Returns the number of channels in the file. Same as
spec.numChannels.- returns
the number of channels
-
final
def
position_=(frame: Long): Unit
- Annotations
- @throws( classOf[IOException] )
-
final
def
read(data: Frames): AudioFile
- Annotations
- @throws( classOf[IOException] )
- final def sampleFormat: SampleFormat
- final def sampleRate: Double
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
write(data: Frames): AudioFile
- Annotations
- @throws( classOf[IOException] )