Base class for all players. More...

Inheritance diagram for Crosstales.DJ.BasePlayer:
Crosstales.DJ.IPlayer Crosstales.DJ.SimplePlayer Crosstales.DJ.Turntable

Public Member Functions

abstract void Play ()
 Plays the record. More...
 
abstract void Next ()
 Plays the next record. More...
 
abstract void Previous ()
 Plays the previous record. More...
 
abstract void Pause ()
 Pauses the playback of the record. More...
 
abstract void UnPause ()
 Unpause the playback of the record. More...
 
abstract void Stop ()
 Stops the playback of the record. More...
 
abstract void Restart ()
 Restarts the playback of the record. More...
 
abstract void Mute ()
 Mute the playback of the record. More...
 
abstract void UnMute ()
 Unmute the playback of the record. More...
 
virtual void PlayOrStop ()
 Plays or stops the record. More...
 
virtual void PauseOrUnPause ()
 Pause or unpause the playback of the record. More...
 
virtual void MuteOrUnMute ()
 Mute or unmute the playback of the record. More...
 

Static Public Attributes

static bool isAnyPlayback => playCounter > 0
 Checks if any Turntable is in playback-mode on this system. More...
 
static bool isAnyAudioPlaying => audioCounter > 0
 Checks if ANY Turntable playing audio on this system. More...
 

Protected Member Functions

virtual void onPlaybackStart (Record record)
 
virtual void onPlaybackEnd (Record record)
 
virtual void onBufferingStart (Record record)
 
virtual void onBufferingEnd (Record record)
 
virtual void onBufferingProgressUpdate (Record record, float progress)
 
virtual void onAudioStart (Record record)
 
virtual void onAudioEnd (Record record)
 
virtual void onLoopPositionReached (Record record, LoopPoint lp)
 
virtual void onAudioPlayTimeUpdate (Record record, float playtime)
 
virtual void onErrorInfo (Record record, string info)
 

Properties

static int? playCounter [get, set]
 
static int? audioCounter [get, set]
 
abstract PlaybackStartEvent onPlaybackStarted [get]
 
abstract PlaybackEndEvent onPlaybackEnded [get]
 
abstract AudioStartEvent onAudioStarted [get]
 
abstract AudioEndEvent onAudioEnded [get]
 
abstract ErrorEvent onError [get]
 
abstract Record Record [get, set]
 An event triggered whenever all providers are ready. More...
 
abstract bool isLoop [get, set]
 
abstract byte[] AudioData [get, set]
 
abstract bool HandleFocus [get, set]
 
abstract bool Caching [get, set]
 
abstract bool Streaming [get, set]
 
abstract int ChunkSize [get, set]
 
abstract int CacheStreamSize [get, set]
 
abstract int BufferSize [get, set]
 
abstract bool CaptureDataStream [get, set]
 
abstract bool ForceInternalMP3Codec [get, set]
 
abstract bool ForceInternalOGGCodec [get, set]
 
abstract bool InternalCodecsReadPCM [get, set]
 
abstract bool ReadDataAsStream [get, set]
 
abstract AudioSource Source [get, protected set]
 
abstract float Position [get, set]
 
abstract int SamplePosition [get, set]
 
abstract float Elapsed [get, set]
 
abstract float Duration [get]
 
abstract int Samples [get]
 
abstract Crosstales.DJ.Model.Enum.AudioCodec Codec [get, protected set]
 
abstract float BufferProgress [get, protected set]
 
abstract bool isBuffering [get]
 
abstract bool isPlayback [get]
 
abstract bool isAudioPlaying [get, protected set]
 
abstract bool isPaused [get, set]
 
abstract System.IO.Stream DataStream [get, protected set]
 
abstract int Channels [get]
 
abstract int SampleRate [get]
 
abstract float Volume [get, set]
 
abstract float Pitch [get, set]
 
abstract float StereoPan [get, set]
 
abstract bool isMuted [get, set]
 
abstract System.Collections.Generic.List< RecordPlayedRecords [get]
 
- Properties inherited from Crosstales.DJ.IPlayer
Crosstales.DJ.Model.Record Record [get, set]
 Current record of this player. More...
 
bool isLoop [get, set]
 Loop the record on/off. More...
 
byte[] AudioData [get, set]
 Audio data for the current Record read outside of DJ (e.g. from the Android SAF). More...
 
bool HandleFocus [get, set]
 Starts and stops the Turntable depending on the focus and running state. More...
 
bool Caching [get, set]
 Caches the tracks if possible on/off. More...
 
bool Streaming [get, set]
 Enable or disable the streaming of audio files. More...
 
int ChunkSize [get, set]
 Size of the streaming-chunk in bytes (CT-decoder only). More...
 
int CacheStreamSize [get, set]
 Size of the cache stream in bytes (CT-decoder only). More...
 
int BufferSize [get, set]
 Size of the buffer in bytes (CT-decoder only). More...
 
bool CaptureDataStream [get, set]
 Capture the encoded PCM-stream from this player. More...
 
bool ForceInternalMP3Codec [get, set]
 Force internal MP3 codec instead of FMOD (Unity). More...
 
bool ForceInternalOGGCodec [get, set]
 Force internal OGG codec instead of FMOD (Unity). More...
 
bool InternalCodecsReadPCM [get, set]
 Read PCM data directly with the internal codecs. This is the standard behaviour for WebGL. More...
 
bool ReadDataAsStream [get, set]
 Reads the file data as stream. More...
 
AudioSource Source [get]
 AudioSource for this player. More...
 
float Position [get, set]
 Position of the current audio record in percent. More...
 
int SamplePosition [get, set]
 Position of the current audio record in samples. More...
 
float Elapsed [get, set]
 Elapsed time of the current audio record in seconds. More...
 
float Duration [get]
 Returns the duration of the current audio record in seconds. More...
 
int Samples [get]
 Returns the total samples of the current audio record. More...
 
Crosstales.DJ.Model.Enum.AudioCodec Codec [get]
 Codec of for this player. More...
 
float BufferProgress [get]
 Current buffer progress. More...
 
bool isBuffering [get]
 Is this player buffering? More...
 
bool isPlayback [get]
 Is this player in playback-mode? More...
 
bool isAudioPlaying [get]
 Is this player playing audio? More...
 
bool isPaused [get, set]
 Is this player in paused? More...
 
System.IO.Stream DataStream [get]
 Encoded PCM-stream from this player. More...
 
int Channels [get]
 Current audio channels of the current record. More...
 
int SampleRate [get]
 Current audio sample rate of the current record. More...
 
float Volume [get, set]
 Current volume of this player. More...
 
float Pitch [get, set]
 Current pitch of this player. More...
 
float StereoPan [get, set]
 Current stereo pan of this player. More...
 
bool isMuted [get, set]
 Is this player muted? More...
 
System.Collections.Generic.List< Crosstales.DJ.Model.RecordPlayedRecords [get]
 List of all played records. More...
 

Events

PlaybackStart OnPlaybackStart
 An event triggered whenever the playback starts. More...
 
PlaybackEnd OnPlaybackEnd
 An event triggered whenever the playback ends. More...
 
BufferingStart OnBufferingStart
 An event triggered whenever the buffering starts. More...
 
BufferingEnd OnBufferingEnd
 An event triggered whenever the buffering ends. More...
 
BufferingProgressUpdate OnBufferingProgressUpdate
 An event triggered whenever the buffering progress changes. More...
 
AudioStart OnAudioStart
 An event triggered whenever the audio starts. More...
 
AudioEnd OnAudioEnd
 An event triggered whenever the audio ends. More...
 
LoopPositionReached OnLoopPositionReached
 An event triggered whenever the audio loops. More...
 
AudioPlayTimeUpdate OnAudioPlayTimeUpdate
 An event triggered whenever the audio playtime changes. More...
 
ErrorInfo OnErrorInfo
 An event triggered whenever an error occurs. More...
 

Detailed Description

Base class for all players.

Member Function Documentation

◆ Mute()

abstract void Crosstales.DJ.BasePlayer.Mute ( )
pure virtual

Mute the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ MuteOrUnMute()

virtual void Crosstales.DJ.BasePlayer.MuteOrUnMute ( )
virtual

Mute or unmute the playback of the record.

Implements Crosstales.DJ.IPlayer.

◆ Next()

abstract void Crosstales.DJ.BasePlayer.Next ( )
pure virtual

Plays the next record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ Pause()

abstract void Crosstales.DJ.BasePlayer.Pause ( )
pure virtual

Pauses the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ PauseOrUnPause()

virtual void Crosstales.DJ.BasePlayer.PauseOrUnPause ( )
virtual

Pause or unpause the playback of the record.

Implements Crosstales.DJ.IPlayer.

◆ Play()

abstract void Crosstales.DJ.BasePlayer.Play ( )
pure virtual

Plays the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ PlayOrStop()

virtual void Crosstales.DJ.BasePlayer.PlayOrStop ( )
virtual

Plays or stops the record.

Implements Crosstales.DJ.IPlayer.

◆ Previous()

abstract void Crosstales.DJ.BasePlayer.Previous ( )
pure virtual

Plays the previous record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ Restart()

abstract void Crosstales.DJ.BasePlayer.Restart ( )
pure virtual

Restarts the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ Stop()

abstract void Crosstales.DJ.BasePlayer.Stop ( )
pure virtual

Stops the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ UnMute()

abstract void Crosstales.DJ.BasePlayer.UnMute ( )
pure virtual

Unmute the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

◆ UnPause()

abstract void Crosstales.DJ.BasePlayer.UnPause ( )
pure virtual

Unpause the playback of the record.

Implements Crosstales.DJ.IPlayer.

Implemented in Crosstales.DJ.Turntable, and Crosstales.DJ.SimplePlayer.

Member Data Documentation

◆ isAnyAudioPlaying

bool Crosstales.DJ.BasePlayer.isAnyAudioPlaying => audioCounter > 0
static

Checks if ANY Turntable playing audio on this system.

Returns
True if Turntable playing audio on this system.

◆ isAnyPlayback

bool Crosstales.DJ.BasePlayer.isAnyPlayback => playCounter > 0
static

Checks if any Turntable is in playback-mode on this system.

Returns
True if Turntable is in playback-mode on this system.

Property Documentation

◆ Record

abstract Record Crosstales.DJ.BasePlayer.Record
getset

An event triggered whenever all providers are ready.

Event Documentation

◆ OnAudioEnd

AudioEnd Crosstales.DJ.BasePlayer.OnAudioEnd

An event triggered whenever the audio ends.

◆ OnAudioPlayTimeUpdate

AudioPlayTimeUpdate Crosstales.DJ.BasePlayer.OnAudioPlayTimeUpdate

An event triggered whenever the audio playtime changes.

◆ OnAudioStart

AudioStart Crosstales.DJ.BasePlayer.OnAudioStart

An event triggered whenever the audio starts.

◆ OnBufferingEnd

BufferingEnd Crosstales.DJ.BasePlayer.OnBufferingEnd

An event triggered whenever the buffering ends.

◆ OnBufferingProgressUpdate

BufferingProgressUpdate Crosstales.DJ.BasePlayer.OnBufferingProgressUpdate

An event triggered whenever the buffering progress changes.

◆ OnBufferingStart

BufferingStart Crosstales.DJ.BasePlayer.OnBufferingStart

An event triggered whenever the buffering starts.

◆ OnErrorInfo

ErrorInfo Crosstales.DJ.BasePlayer.OnErrorInfo

An event triggered whenever an error occurs.

◆ OnLoopPositionReached

LoopPositionReached Crosstales.DJ.BasePlayer.OnLoopPositionReached

An event triggered whenever the audio loops.

◆ OnPlaybackEnd

PlaybackEnd Crosstales.DJ.BasePlayer.OnPlaybackEnd

An event triggered whenever the playback ends.

◆ OnPlaybackStart

PlaybackStart Crosstales.DJ.BasePlayer.OnPlaybackStart

An event triggered whenever the playback starts.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/DJPro/DJPro/Assets/Plugins/crosstales/DJ/Scripts/BasePlayer.cs