trait AsyncAudioFile extends AudioFileBase with AsyncChannel
- Alphabetic
- By Inheritance
- AsyncAudioFile
- AsyncChannel
- AudioFileBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def canSeek: Boolean
Whether it is possible to call the
seek
method.Whether it is possible to call the
seek
method. This is the case if the file was opened directly with a file-based method instead ofInputStream
orOutputStream
only.- Definition Classes
- AudioFileBase
- 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.- Definition Classes
- AudioFileBase
- See also
#close()
- abstract def close(): Future[Unit]
- Definition Classes
- AsyncChannel
- abstract def flush(): Future[Unit]
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).
- abstract def isOpen: Boolean
- Definition Classes
- AsyncChannel
- abstract def isReadable: Boolean
Whether it is possible to call the
read
method.Whether it is possible to call the
read
method. In general, all files opened viaopenRead
oropenWrite
will be readable, but external codecs may in theory be writable only.- Definition Classes
- AudioFileBase
- abstract def isWritable: Boolean
Whether it is possible to call the
write
method.Whether it is possible to call the
write
method. This is the case if the file was opened viaopenWrite
.- Definition Classes
- AudioFileBase
- 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
- Definition Classes
- AudioFileBase
- Exceptions thrown
java.io.IOException
this is never thrown but declared as of theInterleavedStreamFile
interface
- 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.
- Definition Classes
- AudioFileBase
- Exceptions thrown
java.io.IOException
when the position cannot be queried
- abstract def read(data: Frames, off: Int, len: Int): Future[Unit]
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.
- returns
either a success, or a failure with java.io.IOException if a read error or end-of-file occurred.
- abstract def seek(frame: Long): AsyncAudioFile.this.type
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.
- Definition Classes
- AudioFileBase
- Annotations
- @throws(classOf[IOException])
- Exceptions thrown
java.io.IOException
when 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.
Returns a description of the audio file's specification.
- Definition Classes
- AudioFileBase
- abstract def uri: Option[URI]
- Definition Classes
- AudioFileBase
- abstract def write(data: Frames, off: Int, len: Int): Future[Unit]
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.
- returns
either a success, or a failure with java.io.IOException if a write error occurred.
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
- Definition Classes
- AudioFileBase
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def fileType: AudioFileType
- Definition Classes
- AudioFileBase
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- Definition Classes
- AudioFileBase
- final def position_=(frame: Long): Unit
- Definition Classes
- AudioFileBase
- Annotations
- @throws(classOf[IOException])
- final def read(data: Frames): Future[Unit]
- final def sampleFormat: SampleFormat
- Definition Classes
- AudioFileBase
- final def sampleRate: Double
- Definition Classes
- AudioFileBase
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def write(data: Frames): Future[Unit]
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated