Package com.tagtraum.beatunes
Class ITunesPlayerComponent
- java.lang.Object
-
- com.tagtraum.beatunes.ITunesPlayerComponent
-
- All Implemented Interfaces:
AudioPlayer
,PlayListPlayer
,ApplicationComponent<BeaTunes>
@Deprecated public class ITunesPlayerComponent extends Object implements ApplicationComponent<BeaTunes>, PlayListPlayer
Deprecated.ITunesPlayerComponent.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tagtraum.audiokern.PlayListPlayer
PlayListPlayer.RepeatMode, PlayListPlayer.ScanMode
-
-
Constructor Summary
Constructors Constructor Description ITunesPlayerComponent()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAudioPlayerListener(AudioPlayerListener listener)
Deprecated.void
addPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Adds aPlayListPlayerInterceptor
.void
addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.void
addPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.void
close()
Deprecated.Closes the audio file and associated player resources.int
currentIndex()
Deprecated.Filtered index of the current song in the played list/component.void
fastForward()
Deprecated.Plays the file forward at accelerated speed.BeaTunes
getApplication()
Deprecated.Returns the main application component.AudioDevice
getAudioDevice()
Deprecated.Current audio device.JComponent
getComponent()
Deprecated.Main display component for the currently active playlist.long
getDuration()
Deprecated.Duration of the song in ms.String
getId()
Deprecated.Unique id for each instance of this object.PlayListIterator<AudioSong>
getIterator()
Deprecated.Returns the currently used iterator.Long
getPlayListId()
Deprecated.Persistent identifier of the current playlist, if available.PlayListPlayer.RepeatMode
getRepeatMode()
Deprecated.The current repeat mode.ReplayGain.Type
getReplayGainType()
Deprecated.Currently configured type of replay gain.PlayListPlayer.ScanMode
getScanMode()
Deprecated.The current scan mode.AudioSong
getSong()
Deprecated.Returns the currently opened song.long
getTime()
Deprecated.Returns the current time in ms.float
getVolume()
Deprecated.Returns the volume.void
init()
Deprecated.Initializes this component and its sub-components.boolean
isActive()
Deprecated.Indicates whether this player is actually working.boolean
isDone()
Deprecated.True, if the song was played to the end.boolean
isMuted()
Deprecated.Indicates whether the player is muted.boolean
isPaused()
Deprecated.Indicates whether the song is currently playing.void
next()
Deprecated.Move to next song.void
open(AudioSong song)
Deprecated.Opens a song.void
open(PlayListIterator<AudioSong> iterator)
Deprecated.Open the song returned by the firstListIterator.next()
call.void
pause()
Deprecated.Stops playback.void
play()
Deprecated.Starts playback.void
playPause()
Deprecated.Starts playback, if song is paused, otherwise pauses playback.void
previous()
Deprecated.Move to previous song.void
removeAudioPlayerListener(AudioPlayerListener listener)
Deprecated.void
removePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Removed aPlayListPlayerInterceptor
.void
removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.void
removePropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.void
reset()
Deprecated.Positions the player at the beginning of the file.void
setActive(boolean active)
Deprecated.Activates the player.void
setApplication(BeaTunes application)
Deprecated.Sets the main application component.void
setAudioDevice(AudioDevice audioDevice)
Deprecated.Sets the desired audio device.void
setMuted(boolean muted)
Deprecated.Un/mutes this player.void
setRepeatMode(PlayListPlayer.RepeatMode mode)
Deprecated.Sets the current repeat mode.void
setReplayGainType(ReplayGain.Type type)
Deprecated.Asks the player to respect the given kind of replay gain.void
setScanMode(PlayListPlayer.ScanMode mode)
Deprecated.Sets a new scan mode.void
setTime(long time)
Deprecated.Sets the current time in ms.void
setVolume(float volume)
Deprecated.Changes the volume.void
shutdown()
Deprecated.Shuts down this component and its sub-components.
-
-
-
Method Detail
-
getId
public String getId()
Deprecated.Description copied from interface:ApplicationComponent
Unique id for each instance of this object.- Specified by:
getId
in interfaceApplicationComponent<BeaTunes>
- Returns:
- id
-
getApplication
public BeaTunes getApplication()
Deprecated.Description copied from interface:ApplicationComponent
Returns the main application component.- Specified by:
getApplication
in interfaceApplicationComponent<BeaTunes>
- Returns:
- application object
-
setApplication
public void setApplication(BeaTunes application)
Deprecated.Description copied from interface:ApplicationComponent
Sets the main application component.- Specified by:
setApplication
in interfaceApplicationComponent<BeaTunes>
- Parameters:
application
- main application component
-
addPlayListPlayerInterceptor
public void addPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Description copied from interface:PlayListPlayer
Adds aPlayListPlayerInterceptor
.- Specified by:
addPlayListPlayerInterceptor
in interfacePlayListPlayer
- Parameters:
interceptor
- interceptor
-
removePlayListPlayerInterceptor
public void removePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Description copied from interface:PlayListPlayer
Removed aPlayListPlayerInterceptor
.- Specified by:
removePlayListPlayerInterceptor
in interfacePlayListPlayer
- Parameters:
interceptor
- interceptor
-
setActive
public void setActive(boolean active)
Deprecated.Activates the player. While active the player uses resources like timers to do its work. Don't activate unless you are actually using it.- Parameters:
active
- active
-
isActive
public boolean isActive()
Deprecated.Indicates whether this player is actually working.- Returns:
- active or not
-
init
public void init()
Deprecated.Description copied from interface:ApplicationComponent
Initializes this component and its sub-components.- Specified by:
init
in interfaceApplicationComponent<BeaTunes>
-
shutdown
public void shutdown() throws ShutdownVetoException
Deprecated.Description copied from interface:ApplicationComponent
Shuts down this component and its sub-components.- Specified by:
shutdown
in interfaceApplicationComponent<BeaTunes>
- Throws:
ShutdownVetoException
- if this component wants to veto the shutdown. This exception is not guaranteed to be honored, i.e. a calling component may simply ignore it
-
setAudioDevice
public void setAudioDevice(AudioDevice audioDevice) throws IllegalArgumentException
Deprecated.Description copied from interface:AudioPlayer
Sets the desired audio device.- Specified by:
setAudioDevice
in interfaceAudioPlayer
- Parameters:
audioDevice
- audio device- Throws:
IllegalArgumentException
- if the device is not supported
-
getAudioDevice
public AudioDevice getAudioDevice()
Deprecated.Description copied from interface:AudioPlayer
Current audio device.- Specified by:
getAudioDevice
in interfaceAudioPlayer
- Returns:
- currently used audio device
-
next
public void next()
Deprecated.Description copied from interface:PlayListPlayer
Move to next song. If playback was active, keep on playing.- Specified by:
next
in interfacePlayListPlayer
-
previous
public void previous()
Deprecated.Description copied from interface:PlayListPlayer
Move to previous song. If playback was active, keep on playing.- Specified by:
previous
in interfacePlayListPlayer
-
open
public void open(PlayListIterator<AudioSong> iterator) throws IOException
Deprecated.Description copied from interface:PlayListPlayer
Open the song returned by the firstListIterator.next()
call. If playback was active, keep on playing.- Specified by:
open
in interfacePlayListPlayer
- Throws:
IOException
- if the first song (obtained throughListIterator.next()
) cannot be opened- See Also:
AudioPlayer.open(AudioSong)
-
getIterator
public PlayListIterator<AudioSong> getIterator()
Deprecated.Description copied from interface:PlayListPlayer
Returns the currently used iterator.- Specified by:
getIterator
in interfacePlayListPlayer
- Returns:
- iterator
-
getPlayListId
public Long getPlayListId()
Deprecated.Description copied from interface:PlayListPlayer
Persistent identifier of the current playlist, if available.- Specified by:
getPlayListId
in interfacePlayListPlayer
- Returns:
- id or null, if not available.
-
getComponent
public JComponent getComponent()
Deprecated.Description copied from interface:PlayListPlayer
Main display component for the currently active playlist.- Specified by:
getComponent
in interfacePlayListPlayer
- Returns:
- main display component for the currently active playlist
-
currentIndex
public int currentIndex()
Deprecated.Description copied from interface:PlayListPlayer
Filtered index of the current song in the played list/component. This index may change dynamically, as the view of the list is filtered or sorted.- Specified by:
currentIndex
in interfacePlayListPlayer
- Returns:
- index
-
getSong
public AudioSong getSong()
Deprecated.Description copied from interface:AudioPlayer
Returns the currently opened song.- Specified by:
getSong
in interfaceAudioPlayer
- Returns:
- currently opened song
-
open
public void open(AudioSong song) throws IOException
Deprecated.Description copied from interface:AudioPlayer
Opens a song.
Calling this method withnull
as argument has the same effect as callingAudioPlayer.close()
.- Specified by:
open
in interfaceAudioPlayer
- Parameters:
song
- song- Throws:
IOException
- if the song cannot be opened
-
play
public void play()
Deprecated.Description copied from interface:AudioPlayer
Starts playback.- Specified by:
play
in interfaceAudioPlayer
-
pause
public void pause()
Deprecated.Description copied from interface:AudioPlayer
Stops playback.- Specified by:
pause
in interfaceAudioPlayer
-
playPause
public void playPause()
Deprecated.Description copied from interface:AudioPlayer
Starts playback, if song is paused, otherwise pauses playback.- Specified by:
playPause
in interfaceAudioPlayer
-
fastForward
public void fastForward()
Deprecated.Description copied from interface:AudioPlayer
Plays the file forward at accelerated speed.- Specified by:
fastForward
in interfaceAudioPlayer
-
close
public void close()
Deprecated.Description copied from interface:AudioPlayer
Closes the audio file and associated player resources.- Specified by:
close
in interfaceAudioPlayer
-
reset
public void reset()
Deprecated.Description copied from interface:AudioPlayer
Positions the player at the beginning of the file. Equivalent to callingAudioPlayer.setTime(long)
with 0 as argument.- Specified by:
reset
in interfaceAudioPlayer
- See Also:
AudioPlayer.setTime(long)
-
getTime
public long getTime()
Deprecated.Description copied from interface:AudioPlayer
Returns the current time in ms.- Specified by:
getTime
in interfaceAudioPlayer
- Returns:
- current time in ms
-
setTime
public void setTime(long time) throws IllegalArgumentException
Deprecated.Description copied from interface:AudioPlayer
Sets the current time in ms.- Specified by:
setTime
in interfaceAudioPlayer
- Parameters:
time
- time in ms- Throws:
IllegalArgumentException
- if the time is not valid because it is either less than 0 or greater than duration- See Also:
AudioPlayer.reset()
,AudioPlayer.getDuration()
-
getDuration
public long getDuration()
Deprecated.Description copied from interface:AudioPlayer
Duration of the song in ms.- Specified by:
getDuration
in interfaceAudioPlayer
- Returns:
- the overall duration of the song in ms.
-
isDone
public boolean isDone()
Deprecated.Description copied from interface:AudioPlayer
True, if the song was played to the end.- Specified by:
isDone
in interfaceAudioPlayer
- Returns:
- true if the song was played to the end.
-
isPaused
public boolean isPaused()
Deprecated.Description copied from interface:AudioPlayer
Indicates whether the song is currently playing.- Specified by:
isPaused
in interfaceAudioPlayer
- Returns:
- false if the song is playing
-
getVolume
public float getVolume()
Deprecated.Description copied from interface:AudioPlayer
Returns the volume.- Specified by:
getVolume
in interfaceAudioPlayer
- Returns:
- value between -1 and 1, negative values equating to silence
-
setVolume
public void setVolume(float volume) throws IllegalArgumentException
Deprecated.Description copied from interface:AudioPlayer
Changes the volume.- Specified by:
setVolume
in interfaceAudioPlayer
- Parameters:
volume
- value between -1 and 1, negative values equating to silence. A volume value outside the valid range will lead to an IllegalArgumentException- Throws:
IllegalArgumentException
- if the value is outside the valid range
-
setMuted
public void setMuted(boolean muted)
Deprecated.Description copied from interface:AudioPlayer
Un/mutes this player.- Specified by:
setMuted
in interfaceAudioPlayer
- Parameters:
muted
- muted
-
isMuted
public boolean isMuted()
Deprecated.Description copied from interface:AudioPlayer
Indicates whether the player is muted.- Specified by:
isMuted
in interfaceAudioPlayer
- Returns:
- true to false
-
setReplayGainType
public void setReplayGainType(ReplayGain.Type type)
Deprecated.Description copied from interface:AudioPlayer
Asks the player to respect the given kind of replay gain. Some players may ignore this property.- Specified by:
setReplayGainType
in interfaceAudioPlayer
- Parameters:
type
- type
-
getReplayGainType
public ReplayGain.Type getReplayGainType()
Deprecated.Description copied from interface:AudioPlayer
Currently configured type of replay gain.- Specified by:
getReplayGainType
in interfaceAudioPlayer
- Returns:
- replay gain type
-
setRepeatMode
public void setRepeatMode(PlayListPlayer.RepeatMode mode)
Deprecated.Description copied from interface:PlayListPlayer
Sets the current repeat mode.- Specified by:
setRepeatMode
in interfacePlayListPlayer
- Parameters:
mode
- mode
-
getRepeatMode
public PlayListPlayer.RepeatMode getRepeatMode()
Deprecated.Description copied from interface:PlayListPlayer
The current repeat mode.- Specified by:
getRepeatMode
in interfacePlayListPlayer
- Returns:
- current repeat mode
-
setScanMode
public void setScanMode(PlayListPlayer.ScanMode mode)
Deprecated.Description copied from interface:PlayListPlayer
Sets a new scan mode.- Specified by:
setScanMode
in interfacePlayListPlayer
- Parameters:
mode
- scan mode
-
getScanMode
public PlayListPlayer.ScanMode getScanMode()
Deprecated.Description copied from interface:PlayListPlayer
The current scan mode.- Specified by:
getScanMode
in interfacePlayListPlayer
- Returns:
- current scan mode
-
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
addPropertyChangeListener
in interfaceAudioPlayer
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
removePropertyChangeListener
in interfaceAudioPlayer
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
addPropertyChangeListener
in interfaceAudioPlayer
-
removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
removePropertyChangeListener
in interfaceAudioPlayer
-
addAudioPlayerListener
public void addAudioPlayerListener(AudioPlayerListener listener)
Deprecated.- Specified by:
addAudioPlayerListener
in interfaceAudioPlayer
-
removeAudioPlayerListener
public void removeAudioPlayerListener(AudioPlayerListener listener)
Deprecated.- Specified by:
removeAudioPlayerListener
in interfaceAudioPlayer
-
-