com.mle.audio.javasound

FileJavaSoundPlayer

class FileJavaSoundPlayer extends BasicJavaSoundPlayer

Use for audio files. Since this constructor opens an InputStream, trait SourceClosing is mixed in so that when this player is closed, so is the InputStream.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FileJavaSoundPlayer
  2. BasicJavaSoundPlayer
  3. SourceClosing
  4. JavaSoundPlayer
  5. StateAwarePlayer
  6. JavaSoundPlayerBase
  7. Seekable
  8. Log
  9. RichPlayer
  10. IPlayer
  11. AutoCloseable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileJavaSoundPlayer(file: Path)

    file

    file to play

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def audioLine: SourceDataLine

    Definition Classes
    JavaSoundPlayerJavaSoundPlayerBase
  8. def bytesToTime(bytes: StorageSize): Duration

    Attributes
    protected
    Definition Classes
    Seekable
  9. def cachedMute: Option[Boolean]

    Definition Classes
    JavaSoundPlayerBase
  10. def cachedVolume: Option[Int]

    Definition Classes
    JavaSoundPlayerBase
  11. def canAdjustVolume: Boolean

    Definition Classes
    JavaSoundPlayerBase
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def close(): Unit

    Releases any player resources (input streams, .

    Releases any player resources (input streams, ...). Playback is stopped.

    Definition Classes
    SourceClosingJavaSoundPlayerIPlayer → AutoCloseable
  14. def controlDescriptions: Array[String]

    Definition Classes
    JavaSoundPlayer
  15. def duration: Duration

    Definition Classes
    Seekable
  16. implicit val ec: ExecutionContext

    Definition Classes
    JavaSoundPlayer
  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def events: Observable[PlayerState]

    returns

    the current player state and any future states

    Definition Classes
    JavaSoundPlayer
  20. def externalVolumeValue(internalValue: Float, min: Float, max: Float): Int

    Definition Classes
    JavaSoundPlayerBase
  21. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def gainControl: Option[FloatControl]

    Definition Classes
    JavaSoundPlayerBase
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def hasGainControl: Boolean

    Definition Classes
    JavaSoundPlayerBase
  25. def hasVolumeControl: Boolean

    Definition Classes
    JavaSoundPlayerBase
  26. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  27. def internalVolumeValue(newVolume: Int, min: Float, max: Float): Float

    Definition Classes
    JavaSoundPlayerBase
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. var lineData: LineData

    Attributes
    protected
    Definition Classes
    JavaSoundPlayer
  30. val log: Logger

    Attributes
    protected
    Definition Classes
    Log
  31. val media: OneShotStream

    Definition Classes
    JavaSoundPlayerSeekable
  32. def mute: Boolean

    Definition Classes
    JavaSoundPlayerBaseRichPlayer
  33. def mute(shouldMute: Boolean): Unit

    Mutes/unmutes the player.

    Mutes/unmutes the player.

    Definition Classes
    JavaSoundPlayerBaseIPlayer
  34. def muteControl: Option[BooleanControl]

    Definition Classes
    JavaSoundPlayerBase
  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def newLine(source: InputStream, subject: Subject[PlayerState]): LineData

    Definition Classes
    JavaSoundPlayer
  37. final def notify(): Unit

    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  39. def onEndOfMedia(): Unit

    Definition Classes
    JavaSoundPlayerStateAwarePlayer
  40. def onPlaybackException(e: Exception): Unit

    Definition Classes
    JavaSoundPlayer
  41. def play(): Unit

    Starts or resumes playback, whichever makes sense.

    Starts or resumes playback, whichever makes sense.

    Definition Classes
    JavaSoundPlayerIPlayer
  42. def playbackEvents: Observable[PlaybackEvent]

    Definition Classes
    JavaSoundPlayer
  43. def position: Duration

    Definition Classes
    JavaSoundPlayerBaseRichPlayer
  44. def reset(): Unit

    Definition Classes
    JavaSoundPlayer
  45. def resetStream(oldStream: InputStream): InputStream

    Returns a stream of the media reset to its initial read position.

    Returns a stream of the media reset to its initial read position. Helper method for seeking.

    The default implementation merely calls reset() on the InputStream and returns the same instance. If possible, override this method, close and open a new stream instead.

    returns

    a stream of the media reset to its initial read position

    Definition Classes
    BasicJavaSoundPlayerJavaSoundPlayer
    See also

    BasicJavaSoundPlayer

  46. def seek(pos: Duration): Unit

    Regardless of whether the user seeks backwards or forwards, here is what we do:

    Regardless of whether the user seeks backwards or forwards, here is what we do:

    Reset the stream to its initial position. Skip bytes from the beginning. (Optionally continue playback.)

    The stream needs to support mark so that we can mark the initial position (constructor). Subsequent calls to reset will therefore go to the initial position. Then we can skip the sufficient amount of bytes and arrive at the correct position. Otherwise seeking would just skip bytes forward every time, relative to the current position.

    This can still be spectacularly inaccurate if a VBR file is seeked but that is a secondary problem.

    pos

    position to seek to

    Definition Classes
    JavaSoundPlayerIPlayer
  47. def seekProblem: Option[String]

    Definition Classes
    BasicJavaSoundPlayerJavaSoundPlayer
  48. var startedFromMicros: Long

    Definition Classes
    Seekable
  49. def state: PlayerStates.Value

    Definition Classes
    JavaSoundPlayerStateAwarePlayer
  50. def stop(): Unit

    Pauses playback.

    Pauses playback.

    Definition Classes
    JavaSoundPlayerIPlayer
  51. var stream: InputStream

    Attributes
    protected
    Definition Classes
    JavaSoundPlayer
  52. def supportsSeek: Boolean

    Definition Classes
    JavaSoundPlayer
  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  54. def timeToBytes(pos: Duration): StorageSize

    Inaccurate.

    Inaccurate. VBR etc.

    Attributes
    protected
    Definition Classes
    Seekable
  55. def timeUpdates: Observable[TimeUpdated]

    A stream of time update events.

    A stream of time update events. Emits the current playback position, then emits at least one event per second provided that the playback position changes. If there is no progress, for example if playback is stopped, no events are emitted.

    returns

    time update events

    Definition Classes
    JavaSoundPlayer
  56. def toString(): String

    Definition Classes
    AnyRef → Any
  57. def toggleMute(): Unit

    Definition Classes
    JavaSoundPlayerBaseIPlayer
  58. def volume(newVolume: Int): Unit

    Adjusts the volume.

    Adjusts the volume.

    Definition Classes
    JavaSoundPlayerBaseIPlayer
  59. def volume: Int

    Definition Classes
    JavaSoundPlayerBaseRichPlayer
  60. def volumeControl: Option[FloatControl]

    Definition Classes
    JavaSoundPlayerBase
  61. def volume_=(newVolume: Int): Unit

    Definition Classes
    JavaSoundPlayerBase
  62. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BasicJavaSoundPlayer

Inherited from SourceClosing

Inherited from JavaSoundPlayer

Inherited from StateAwarePlayer

Inherited from JavaSoundPlayerBase

Inherited from Seekable

Inherited from Log

Inherited from RichPlayer

Inherited from IPlayer

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped