Ryle Radio 1.0.0
An open-source "radio" system for Unity, allowing tracks, tuning, broadcasters, and more!
Loading...
Searching...
No Matches
RyleRadio.Tracks.IRadioTrack Interface Reference

Internal interface for a RadioTrack. More...

Inheritance diagram for RyleRadio.Tracks.IRadioTrack:

Public Member Functions

void Init ()
 Initializes this track.
float GetSample (int _sampleIndex)
 Get a sample at the provided index. This is the core method of a track- whatever you return here defines the audio that the track will play when selected.
virtual void AddToPlayerEndCallback (ref Action< RadioTrackPlayer > _callback)
 Update a RadioTrackPlayer when this current track ends. Used in StationRadioTrack.

Properties

float SampleRate [get, set]
 The samples per second of this track right now. Can be changed at runtime, e.g: StationRadioTrack.
int SampleCount [get, set]
 The total number of samples in this track right now. Can be changed at runtime, e.g: StationRadioTrack.

Detailed Description

Internal interface for a RadioTrack.

truth be told i can't fully remember why i have this and RadioTrack as separate entities- i do know that i went through a lot of effort to make this layout work, though, and so for the moment i'm keeping it in- however if it turns out to be ultimately useless and can be deprecated without issue i'm happy to say goodbye to it /remarks>

Definition at line 20 of file IRadioTrack.cs.

Member Function Documentation

◆ AddToPlayerEndCallback()

virtual void RyleRadio.Tracks.IRadioTrack.AddToPlayerEndCallback ( ref Action< RadioTrackPlayer > _callback)
virtual

Update a RadioTrackPlayer when this current track ends. Used in StationRadioTrack.

See also: RadioTrackPlayer.OnEnd, StationRadioTrack.AddToPlayerEndCallback()

Parameters
_callbackThe function to run when the track ends

Implemented in RyleRadio.Tracks.RadioTrack, and RyleRadio.Tracks.StationRadioTrack.

Definition at line 50 of file IRadioTrack.cs.

◆ GetSample()

float RyleRadio.Tracks.IRadioTrack.GetSample ( int _sampleIndex)
abstract

Get a sample at the provided index. This is the core method of a track- whatever you return here defines the audio that the track will play when selected.

Parameters
_sampleIndexThe index of the sample to get
Returns
The sample- a value between -1 and 1 representing the y-value of the sound wave

Implemented in RyleRadio.Tracks.ClipRadioTrack, RyleRadio.Tracks.ProceduralRadioTrack, RyleRadio.Tracks.RadioTrack, and RyleRadio.Tracks.StationRadioTrack.

◆ Init()

void RyleRadio.Tracks.IRadioTrack.Init ( )
abstract

Property Documentation

◆ SampleCount

int RyleRadio.Tracks.IRadioTrack.SampleCount
getsetabstract

The total number of samples in this track right now. Can be changed at runtime, e.g: StationRadioTrack.

Implemented in RyleRadio.Tracks.RadioTrack.

Definition at line 30 of file IRadioTrack.cs.

◆ SampleRate

float RyleRadio.Tracks.IRadioTrack.SampleRate
getsetabstract

The samples per second of this track right now. Can be changed at runtime, e.g: StationRadioTrack.

Implemented in RyleRadio.Tracks.RadioTrack.

Definition at line 25 of file IRadioTrack.cs.


The documentation for this interface was generated from the following file: