Table of Contents

Class CDGSourceSettings

Namespace
VisioForge.Core.Types.X.Sources
Assembly
VisioForge.Core.dll

CDG source settings. Supports both standalone CDG+Audio files and ZIP archives containing CDG+MP3/WAV pairs. Implements the VisioForge.Core.Types.X.MediaPlayer.IMediaPlayerBaseSourceSettings.

public class CDGSourceSettings : IMediaPlayerBaseSourceSettings, IVideoSourceSettings, IMediaBlockSettings

Inheritance

Implements

Inherited Members

Constructors

CDGSourceSettings(string, string)

Initializes a new instance of the VisioForge.Core.Types.X.Sources.CDGSourceSettings class.

public CDGSourceSettings(string cdgFilename, string audioFilename)

Parameters

cdgFilename string

The CDG filename.

audioFilename string

The audio filename.

CDGSourceSettings(string)

Initializes a new instance of the VisioForge.Core.Types.X.Sources.CDGSourceSettings class from a ZIP archive. The ZIP archive should contain a CDG file and an audio file (MP3, WAV, etc.).

public CDGSourceSettings(string zipFilename)

Parameters

zipFilename string

The ZIP filename containing CDG and audio files.

Properties

AudioFilename

Gets or sets the audio filename.

public string AudioFilename { get; set; }

Property Value

string

CDGFilename

Gets or sets the CDG filename.

public string CDGFilename { get; set; }

Property Value

string

EnablePitchShifting

Gets or sets a value indicating whether to enable pitch shifting capability. When true, the pitch element will be created even if Pitch is 1.0, allowing runtime pitch changes. When false, the pitch element is only created if Pitch != 1.0 at initialization. Default is false for backwards compatibility.

public bool EnablePitchShifting { get; set; }

Property Value

bool

IgnoreAudio

Gets a value indicating whether to ignore audio.

public bool IgnoreAudio { get; }

Property Value

bool

IsExtracted

Gets a value indicating whether ZIP contents have been extracted.

public bool IsExtracted { get; }

Property Value

bool

IsZipSource

Gets a value indicating whether source is from a ZIP archive.

public bool IsZipSource { get; }

Property Value

bool

Pitch

Gets or sets the pitch multiplier for audio playback. Default is 1.0 (no pitch change). Values greater than 1.0 increase pitch, values less than 1.0 decrease pitch. Valid range is approximately 0.1 to 10.0. Setting this property during playback will immediately apply the pitch change if EnablePitchShifting is true.

public double Pitch { get; set; }

Property Value

double

PitchSemitones

Gets or sets the pitch in semitones for audio playback. This is a convenience property that converts semitones to pitch multiplier. Valid range is -12 to +12 semitones (one octave down/up). Setting this property during playback will immediately apply the pitch change if EnablePitchShifting is true.

public double PitchSemitones { get; set; }

Property Value

double

ZipFilename

Gets or sets the ZIP filename containing CDG and audio files. When set, the ZIP archive will be extracted to a temporary directory and CDG/Audio filenames will be auto-detected.

public string ZipFilename { get; set; }

Property Value

string

Methods

CleanupTempDirectory()

Cleans up the temporary directory used for ZIP extraction.

public void CleanupTempDirectory()

CreateBlock()

Creates the block.

public MediaBlock CreateBlock()

Returns

MediaBlock

MediaBlock.

ExtractZipContents()

Extracts the ZIP archive contents to a temporary directory and auto-detects CDG and audio files.

public bool ExtractZipContents()

Returns

bool

true if extraction and detection succeeded; otherwise, false.

ReadInfoAsync()

Read information as an asynchronous operation.

public Task<MediaFileInfo> ReadInfoAsync()

Returns

Task<MediaFileInfo>

A Task<MediaFileInfo> representing the asynchronous operation.

See Also