CsoundUnity 3.4.0
https://github.com/rorywalsh/CsoundUnity
CsoundUnityChild Class Reference

CsoundUnityChild is a component that can output AudioChannels found in the csd of the associated CsoundUnity gameObject More...

Inheritance diagram for CsoundUnityChild:

Public Types

enum  AudioChannels { MONO = 1 , STEREO = 2 }
 

Public Member Functions

void Init (CsoundUnity csound, AudioChannels audioChannels=AudioChannels.MONO)
 Initializes this CsoundUnityChild instance setting the CsoundUnity reference and the audioChannels settings. More...
 
void SetAudioChannel (int channel, int audioChannel)
 Used after Init(), sets the audioChannel index from the CsoundUnity.availableAudioChannels for each channel More...
 

Public Attributes

GameObject csoundUnityGameObject
 The gameObject with the CsoundUnity component to load Audio Channels from More...
 
AudioChannels AudioChannelsSetting = AudioChannels.MONO
 Defines if this CsoundUnityChild will use one (MONO) or two (STEREO) channels. In the case of a MONO setting, each sample is multiplied by 0.5f and sent to both output channels, to obtain the same volume as the original audio file, More...
 
int[] selectedAudioChannelIndexByChannel
 An array containing the selected audiochannel indexes by channel: MONO = 0, STEREO = 1 More...
 
List< string > availableAudioChannels
 A list to hold available audioChannels names More...
 
List< MYFLT[]> namedAudioChannelData = new List<MYFLT[]>()
 A list to hold the current audio buffer data for each channel More...
 

Detailed Description

CsoundUnityChild is a component that can output AudioChannels found in the csd of the associated CsoundUnity gameObject

Definition at line 41 of file CsoundUnityChild.cs.

Member Enumeration Documentation

◆ AudioChannels

Enumerator
MONO 
STEREO 

Definition at line 52 of file CsoundUnityChild.cs.

Member Function Documentation

◆ Init()

void CsoundUnityChild.Init ( CsoundUnity  csound,
AudioChannels  audioChannels = AudioChannels.MONO 
)

Initializes this CsoundUnityChild instance setting the CsoundUnity reference and the audioChannels settings.

Definition at line 148 of file CsoundUnityChild.cs.

◆ SetAudioChannel()

void CsoundUnityChild.SetAudioChannel ( int  channel,
int  audioChannel 
)

Used after Init(), sets the audioChannel index from the CsoundUnity.availableAudioChannels for each channel

Parameters
channelThe channel this setting refers to: 0 = LEFT, 1 = RIGHT
audioChannelThe CsoundUnity audioChannel index in the CsoundUnity.availableAudioChannels list

Definition at line 169 of file CsoundUnityChild.cs.

Member Data Documentation

◆ AudioChannelsSetting

AudioChannels CsoundUnityChild.AudioChannelsSetting = AudioChannels.MONO

Defines if this CsoundUnityChild will use one (MONO) or two (STEREO) channels. In the case of a MONO setting, each sample is multiplied by 0.5f and sent to both output channels, to obtain the same volume as the original audio file,

Definition at line 60 of file CsoundUnityChild.cs.

◆ availableAudioChannels

List<string> CsoundUnityChild.availableAudioChannels

A list to hold available audioChannels names

Definition at line 72 of file CsoundUnityChild.cs.

◆ csoundUnityGameObject

GameObject CsoundUnityChild.csoundUnityGameObject

The gameObject with the CsoundUnity component to load Audio Channels from

Definition at line 50 of file CsoundUnityChild.cs.

◆ namedAudioChannelData

List<MYFLT[]> CsoundUnityChild.namedAudioChannelData = new List<MYFLT[]>()

A list to hold the current audio buffer data for each channel

Definition at line 78 of file CsoundUnityChild.cs.

◆ selectedAudioChannelIndexByChannel

int [] CsoundUnityChild.selectedAudioChannelIndexByChannel

An array containing the selected audiochannel indexes by channel: MONO = 0, STEREO = 1

Definition at line 66 of file CsoundUnityChild.cs.


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