Base class for all players. More...

Public Member Functions | |
abstract void | Play () |
Plays the radio-station. More... | |
abstract void | Stop () |
Stops the playback of the radio-station. More... | |
abstract void | Restart (float invokeDelay=Constants.INVOKE_DELAY) |
Restarts the playback of the radio-station. 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 radio-station. More... | |
virtual void | MuteOrUnMute () |
Mute or unmute the playback of the record. More... | |
Static Public Attributes | |
static bool | isAnyPlayback => playCounter > 0 |
Checks if ANY RadioPlayer is in playback-mode on this system. More... | |
static bool | isAnyAudioPlaying => audioCounter > 0 |
Checks if ANY RadioPlayer playing audio on this system. More... | |
Protected Member Functions | |
virtual void | onPlaybackStart (RadioStation station) |
virtual void | onPlaybackEnd (RadioStation station) |
virtual void | onBufferingStart (RadioStation station) |
virtual void | onBufferingEnd (RadioStation station) |
virtual void | onBufferingProgressUpdate (RadioStation station, float progress) |
virtual void | onAudioStart (RadioStation station) |
virtual void | onAudioEnd (RadioStation station) |
virtual void | onAudioPlayTimeUpdate (RadioStation station, float _playtime) |
virtual void | onRecordChange (RadioStation station, RecordInfo newRecord) |
virtual void | onRecordPlayTimeUpdate (RadioStation station, RecordInfo record, float playtime) |
virtual void | onNextRecordChange (RadioStation station, RecordInfo nextRecord, float delay) |
virtual void | onNextRecordDelayUpdate (RadioStation station, RecordInfo nextRecord, float delay) |
virtual void | onErrorInfo (RadioStation station, string info) |
Properties | |
static int? | playCounter [get, set] |
static int? | audioCounter [get, set] |
abstract PlaybackStartEvent | onPlaybackStarted [get] |
abstract PlaybackEndEvent | onPlaybackEnded [get] |
abstract BufferingStartEvent | onBufferingStarted [get] |
abstract BufferingEndEvent | onBufferingEnded [get] |
abstract AudioStartEvent | onAudioStarted [get] |
abstract AudioEndEvent | onAudioEnded [get] |
abstract RecordChangeEvent | onRecordChanged [get] |
abstract ErrorEvent | onError [get] |
abstract RadioStation | Station [get, set] |
abstract bool | HandleFocus [get, set] |
abstract int | CacheStreamSize [get, set] |
abstract bool | LegacyMode [get, set] |
abstract bool | CaptureDataStream [get, set] |
abstract bool | SkipPreBuffering [get, set] |
abstract AudioSource | Source [get, protected set] |
abstract AudioCodec | Codec [get, protected set] |
abstract float | PlayTime [get, protected set] |
abstract float | BufferProgress [get, protected set] |
abstract bool | isBuffering [get] |
abstract long | CurrentBufferSize [get] |
abstract bool | isPlayback [get] |
abstract bool | isAudioPlaying [get] |
abstract float | RecordPlayTime [get, protected set] |
abstract RecordInfo | RecordInfo [get] |
abstract RecordInfo | NextRecordInfo [get] |
abstract float | NextRecordDelay [get] |
abstract long | CurrentDownloadSpeed [get] |
abstract Crosstales.Common.Util.MemoryCacheStream | 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] |
![]() | |
RadioStation | Station [get, set] |
Current RadioStation of this player. More... | |
bool | HandleFocus [get, set] |
Starts and stops the RadioPlayer depending on the focus and running state. More... | |
int | CacheStreamSize [get, set] |
Size of the cache stream in bytes. More... | |
bool | LegacyMode [get, set] |
Enable or disable legacy mode. Legacy mode disables all record information, but is more stable. More... | |
bool | CaptureDataStream [get, set] |
Capture the encoded PCM-stream from this player. More... | |
bool | SkipPreBuffering [get, set] |
Enable or disable skipping of the pre-buffering. Skip pre-buffering allows for faster playback, but is less resilient. More... | |
AudioSource | Source [get] |
Returns the AudioSource of for this player. More... | |
AudioCodec | Codec [get] |
Returns the codec of for this player. More... | |
float | PlayTime [get] |
Returns the current playtime of this player. More... | |
float | BufferProgress [get] |
Returns the current buffer progress in percent. More... | |
bool | isBuffering [get] |
Is this player buffering? More... | |
long | CurrentBufferSize [get] |
Returns the size of the current buffer in bytes. More... | |
bool | isPlayback [get] |
Is this player in playback-mode? More... | |
bool | isAudioPlaying [get] |
Is this player playing audio? More... | |
float | RecordPlayTime [get] |
Returns the playtime of the current audio record. More... | |
RecordInfo | RecordInfo [get] |
Returns the information about the current audio record. More... | |
RecordInfo | NextRecordInfo [get] |
Returns the information about the next audio record. This information is updated a few seconds before a new record starts. More... | |
float | NextRecordDelay [get] |
Returns the current delay in seconds until the next audio record starts. More... | |
long | CurrentDownloadSpeed [get] |
Returns the current download speed in Bytes per second. More... | |
Crosstales.Common.Util.MemoryCacheStream | DataStream [get] |
Returns the encoded PCM-stream from this player. More... | |
int | Channels [get] |
Current audio channels of the current station. More... | |
int | SampleRate [get] |
Current audio sample rate of the current station. 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... | |
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... | |
AudioPlayTimeUpdate | OnAudioPlayTimeUpdate |
An event triggered whenever the audio playtime changes. More... | |
RecordChange | OnRecordChange |
An event triggered whenever an audio record changes. More... | |
RecordPlayTimeUpdate | OnRecordPlayTimeUpdate |
An event triggered whenever the audio record playtime changes. More... | |
NextRecordChange | OnNextRecordChange |
An event triggered whenever the next record information is available. More... | |
NextRecordDelayUpdate | OnNextRecordDelayUpdate |
An event triggered whenever the next record delay time changes. More... | |
ErrorInfo | OnErrorInfo |
An event triggered whenever an error occurs. More... | |
Detailed Description
Base class for all players.
Member Function Documentation
◆ Mute()
|
pure virtual |
Mute the playback of the record.
Implements Crosstales.Radio.IPlayer.
Implemented in Crosstales.Radio.SimplePlayer, and Crosstales.Radio.RadioPlayer.
◆ MuteOrUnMute()
|
virtual |
Mute or unmute the playback of the record.
Implements Crosstales.Radio.IPlayer.
◆ Play()
|
pure virtual |
Plays the radio-station.
Implements Crosstales.Radio.IPlayer.
Implemented in Crosstales.Radio.SimplePlayer, and Crosstales.Radio.RadioPlayer.
◆ PlayOrStop()
|
virtual |
Plays or stops the radio-station.
Implements Crosstales.Radio.IPlayer.
◆ Restart()
|
pure virtual |
Restarts the playback of the radio-station.
- Parameters
-
invokeDelay Delay for the restart (default: 0.4, optional)
Implements Crosstales.Radio.IPlayer.
Implemented in Crosstales.Radio.SimplePlayer, and Crosstales.Radio.RadioPlayer.
◆ Stop()
|
pure virtual |
Stops the playback of the radio-station.
Implements Crosstales.Radio.IPlayer.
Implemented in Crosstales.Radio.SimplePlayer, and Crosstales.Radio.RadioPlayer.
◆ UnMute()
|
pure virtual |
Unmute the playback of the record.
Implements Crosstales.Radio.IPlayer.
Implemented in Crosstales.Radio.SimplePlayer, and Crosstales.Radio.RadioPlayer.
Member Data Documentation
◆ isAnyAudioPlaying
|
static |
Checks if ANY RadioPlayer playing audio on this system.
- Returns
- True if RadioPlayer playing audio on this system.
◆ isAnyPlayback
|
static |
Checks if ANY RadioPlayer is in playback-mode on this system.
- Returns
- True if RadioPlayer is in playback-mode on this system.
Event Documentation
◆ OnAudioEnd
AudioEnd Crosstales.Radio.BasePlayer.OnAudioEnd |
An event triggered whenever the audio ends.
ry>
◆ OnAudioPlayTimeUpdate
AudioPlayTimeUpdate Crosstales.Radio.BasePlayer.OnAudioPlayTimeUpdate |
An event triggered whenever the audio playtime changes.
◆ OnAudioStart
AudioStart Crosstales.Radio.BasePlayer.OnAudioStart |
An event triggered whenever the audio starts.
◆ OnBufferingEnd
BufferingEnd Crosstales.Radio.BasePlayer.OnBufferingEnd |
An event triggered whenever the buffering ends.
◆ OnBufferingProgressUpdate
BufferingProgressUpdate Crosstales.Radio.BasePlayer.OnBufferingProgressUpdate |
An event triggered whenever the buffering progress changes.
◆ OnBufferingStart
BufferingStart Crosstales.Radio.BasePlayer.OnBufferingStart |
An event triggered whenever the buffering starts.
◆ OnErrorInfo
ErrorInfo Crosstales.Radio.BasePlayer.OnErrorInfo |
An event triggered whenever an error occurs.
◆ OnNextRecordChange
NextRecordChange Crosstales.Radio.BasePlayer.OnNextRecordChange |
An event triggered whenever the next record information is available.
◆ OnNextRecordDelayUpdate
NextRecordDelayUpdate Crosstales.Radio.BasePlayer.OnNextRecordDelayUpdate |
An event triggered whenever the next record delay time changes.
◆ OnPlaybackEnd
PlaybackEnd Crosstales.Radio.BasePlayer.OnPlaybackEnd |
An event triggered whenever the playback ends.
◆ OnPlaybackStart
PlaybackStart Crosstales.Radio.BasePlayer.OnPlaybackStart |
An event triggered whenever the playback starts.
◆ OnRecordChange
RecordChange Crosstales.Radio.BasePlayer.OnRecordChange |
An event triggered whenever an audio record changes.
◆ OnRecordPlayTimeUpdate
RecordPlayTimeUpdate Crosstales.Radio.BasePlayer.OnRecordPlayTimeUpdate |
An event triggered whenever the audio record playtime changes.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/Radio/RadioPro/Assets/Plugins/crosstales/Radio/Scripts/BasePlayer.cs