PrimoBurner for .NET  5.0
CD, DVD and Blu-ray Software Development Kit
Loading...
Searching...
No Matches
AudioInput Class Reference

Defines an audio input. More...

Inherits ICloneable.

Public Member Functions

 AudioInput ()
 Creates an empty AudioInput instance.
 
virtual object Clone ()
 Creates a deep copy of this object.
 

Properties

PCMAudioFormat AudioFormat [get, set]
 Gets/Sets the PCM audio format of the audio input.
 
int EndFrame [get, set]
 Gets/Sets the last frame of audio that will be written to the disc.
 
string FilePath [get, set]
 Gets/Sets the full path to the file from which AudioCD should read data during audio CD burning.
 
bool ForceMinTrackLength [get, set]
 Specifies whether to extend an audio input with silence in case its original length is less than 4 seconds.
 
int FullLength [get, set]
 Get/Sets the full length of the audio input in CDDA frames.
 
int StartFrame [get, set]
 Gets/Sets the first frame of audio that will be written to the disc.
 
AudioStorageType Storage [get, set]
 Gets/Sets the audio storage type.
 
System.IO.Stream Stream [get, set]
 Gets/Sets the audio stream object.
 

Detailed Description

Defines an audio input.

Audio inputs are used when Audio CD is being written.

Member Function Documentation

◆ Clone()

virtual object Clone ( )
virtual

Property Documentation

◆ AudioFormat

PCMAudioFormat AudioFormat
getset

Gets/Sets the PCM audio format of the audio input.

This format is needed when the input is PCM. However it is not need if the input PCM is in the CDDA format (44100Hz, 16-bit, stereo) and the file extension is ".cd-audio".

Referenced by AudioInput.Clone().

◆ EndFrame

int EndFrame
getset

Gets/Sets the last frame of audio that will be written to the disc.

This is used in case you do not want to read the audio all the way to the end of the file.

The end frame can be >= 0 or -1. When set to -1 it means audio data should be read until reaching the end of file.

No validation is done against the start frame and the length of the file.

The recording length of the audio will be (EndFrame - StartFrame + 1) in case EndFrame is a positive value and (file length in frames - StartFrame) in case EndFrame is -1.

NOTES: The length of the audio should be at least 300 frames, because the standard mandates that audio CD track is at least 4 seconds long, and 1 sec = 75 frames. Therefore 4 sec x 75 frames/sec = 300 frames.

If the length of the audio is less than 4 sec it will be padded with silence to 4 sec during the burning. The start/end frame validation is done by the AudioCD.WriteToCD method before the burning starts.

Referenced by AudioInput.Clone().

◆ ForceMinTrackLength

bool ForceMinTrackLength
getset

Specifies whether to extend an audio input with silence in case its original length is less than 4 seconds.

The standard audio CD track should be at least 4 seconds in length. Set this property to true to extend an audio input with silence if it is shorter than 4 seconds. The default value is true.

If several audio inputs are to be used to create a single audio track then this property should be set to false for each of these inputs.

NOTE: This property affects only inputs that are less than 4 seconds.

See also
AudioCD.GetInputLength

Referenced by AudioInput.Clone().

◆ FullLength

int FullLength
getset

Get/Sets the full length of the audio input in CDDA frames.

The full audio input length is specified in CDDA frames (1 CDDA frame = 2352 bytes).

The audio length must be either a non-negative value or -1. The special value of -1 is the default one and means that the full length of the audio input is unknown. In this case AudioCD parses the audio input and determines its full length. Any other negative value except -1 is ingored.

Usually it's not needed to set explicitly the full length of the audio input. This property can be useful when the audio input storage (file/stream) is changed after the audio input has been added to AudioCD. In this case resetting the full length to -1 will make AudioCD parse the audio input once again when it needs to determine its full length. Otherwsie AudioCD will use the existing full length (if it's a non-negative value).

◆ StartFrame

int StartFrame
getset

Gets/Sets the first frame of audio that will be written to the disc.

This is used in case you want to read the audio data from the middle of the file.

The start frame must be >= 0. Negative values are ignored. No validation is done against the end frame and the length of the file.

Referenced by AudioInput.Clone().

◆ Storage

AudioStorageType Storage
getset

Gets/Sets the audio storage type.

If you do not set the audio storage type, the default value of AudioStorage.File will be used.

If the audio input is in a CD Audio format (raw PCM, 44100 Hz, 16-bit, stereo) it is used directly and PrimoBurner is not needed to 'decode' the audio source. In addition such audio source is never decoded in a temp file. The CD Audio format is indicated by the extension (.cd-audio).

See also
AudioStorageType, AudioInput.Stream, AudioInput.FilePath

Referenced by AudioInput.Clone().

◆ Stream

System.IO.Stream Stream
getset

Gets/Sets the audio stream object.

Specifies the stream that should be used to get the input audio data when writing an Audio CD.

Additionally the Storage property should be set to AudioStorage.Stream.

Referenced by AudioInput.Clone().