C# Class GAudio.StreamToWavModule

Component for safe writing of wav files from audio streams. Writing occurs in a seperate thread so as not to burden the audio thread. Supports sample accurate start and duration.
Inheritance: AGATStreamObserver, IGATAudioThreadStreamClient
Afficher le fichier Open project: gregzo/G-Audio

Méthodes publiques

Свойство Type Description
path string
pathType PathRelativeType

Méthodes publiques

Méthode Description
EndWriting ( ) : void

Stops writing and finalizes the file's header. As this occurs on a seperate thread, you should not assume that the file is ready to be opened immediately.

IGATAudioThreadStreamClient ( float data, int offset, bool emptyData, IGATAudioThreadStream stream ) : void
OnDestroy ( ) : void
OnDisable ( ) : void
SetPath ( string newPath, PathRelativeType newPathType ) : string

Sets the path to which to write to. If the path contains a non-existent directory, it will be created.

StartWriting ( double targetDspTime = 0d, int recNumFrames = -1 ) : void

Starts writing the stream at precise dspTime if one is specified. If no dspTime is specified, or if the specified dspTime is too soon, starts writing asap. If recNumFrames is specified, writing will automatically stop once the precise number of frames has been written, else you should call EndWriting.

Méthodes protégées

Méthode Description
Start ( ) : void

Method Details

EndWriting() public méthode

Stops writing and finalizes the file's header. As this occurs on a seperate thread, you should not assume that the file is ready to be opened immediately.
public EndWriting ( ) : void
Résultat void

IGATAudioThreadStreamClient() public méthode

public IGATAudioThreadStreamClient ( float data, int offset, bool emptyData, IGATAudioThreadStream stream ) : void
data float
offset int
emptyData bool
stream IGATAudioThreadStream
Résultat void

OnDestroy() public méthode

public OnDestroy ( ) : void
Résultat void

OnDisable() public méthode

public OnDisable ( ) : void
Résultat void

SetPath() public méthode

Sets the path to which to write to. If the path contains a non-existent directory, it will be created.
public SetPath ( string newPath, PathRelativeType newPathType ) : string
newPath string
newPathType PathRelativeType
Résultat string

Start() protected méthode

protected Start ( ) : void
Résultat void

StartWriting() public méthode

Starts writing the stream at precise dspTime if one is specified. If no dspTime is specified, or if the specified dspTime is too soon, starts writing asap. If recNumFrames is specified, writing will automatically stop once the precise number of frames has been written, else you should call EndWriting.
public StartWriting ( double targetDspTime = 0d, int recNumFrames = -1 ) : void
targetDspTime double
recNumFrames int
Résultat void

Property Details

path public_oe property

The path at which to write the file. The path will be processed occording to pathType. To change paths at runtime, use SetPath.
public string path
Résultat string

pathType public_oe property

Type of path: relative to Application.dataPath or persistentDataPath, or absolute.
public PathRelativeType pathType
Résultat PathRelativeType