C# Class Nanook.TheGhost.WavProcessor

Afficher le fichier Open project: Nanook/TheGHOST

Méthodes publiques

Méthode Description
ChangeFsbInternalFilename ( string fsbFilename, string internalFilename ) : void

Converts all found wav files for the songQbKey passed on contruction to FSB format.

CombineAudio ( float volume, string dstFilename ) : void
CreatePreview ( int offset, int length, int fade, float volume, bool volumeApplied, string dstFilename ) : void
CreateSilentWav ( int length, string dstFilename ) : void
CreateSilentWav ( int length, string dstFilename, bool stereo, int samplesPerSec ) : void
FilesEqual ( string fileA, string fileB ) : bool

test 10 1k chunk from random parts of the files

FixWavHeader ( Stream wavStream ) : WavSingleChunkHeader
IsWavSilent ( string filename, float tolerence ) : bool

Test for silent wavs

Normalize ( string filename, bool halfVolume ) : void
ParseWavSingleChunkHeader ( Stream wavStream ) : WavSingleChunkHeader
PlayWav ( string wavFilename, SoundFlags soundFlags ) : void
SetLengthSilenceAndVolume ( float silenceInsertLength, float maxLength, float volume, string fileName ) : void

Adds silence to wav files alter volume

StopWav ( ) : void
Truncate ( string filename, float lengthMs ) : void
WriteSingleChunkHeader ( WavSingleChunkHeader header, Stream wavStream ) : void

Private Methods

Méthode Description
PlaySound ( string pszSound, IntPtr hMod, SoundFlags sf ) : bool

Method Details

ChangeFsbInternalFilename() public méthode

Converts all found wav files for the songQbKey passed on contruction to FSB format.
public ChangeFsbInternalFilename ( string fsbFilename, string internalFilename ) : void
fsbFilename string
internalFilename string
Résultat void

CombineAudio() public static méthode

public static CombineAudio ( float volume, string dstFilename ) : void
volume float
dstFilename string
Résultat void

CreatePreview() public static méthode

public static CreatePreview ( int offset, int length, int fade, float volume, bool volumeApplied, string dstFilename ) : void
offset int
length int
fade int
volume float
volumeApplied bool
dstFilename string
Résultat void

CreateSilentWav() public static méthode

public static CreateSilentWav ( int length, string dstFilename ) : void
length int
dstFilename string
Résultat void

CreateSilentWav() public static méthode

public static CreateSilentWav ( int length, string dstFilename, bool stereo, int samplesPerSec ) : void
length int
dstFilename string
stereo bool
samplesPerSec int
Résultat void

FilesEqual() public static méthode

test 10 1k chunk from random parts of the files
public static FilesEqual ( string fileA, string fileB ) : bool
fileA string
fileB string
Résultat bool

FixWavHeader() public static méthode

public static FixWavHeader ( Stream wavStream ) : WavSingleChunkHeader
wavStream Stream
Résultat WavSingleChunkHeader

IsWavSilent() public static méthode

Test for silent wavs
public static IsWavSilent ( string filename, float tolerence ) : bool
filename string input raw wav
tolerence float 0=0% to 1=1%
Résultat bool

Normalize() public static méthode

public static Normalize ( string filename, bool halfVolume ) : void
filename string
halfVolume bool
Résultat void

ParseWavSingleChunkHeader() public static méthode

public static ParseWavSingleChunkHeader ( Stream wavStream ) : WavSingleChunkHeader
wavStream Stream
Résultat WavSingleChunkHeader

PlayWav() public static méthode

public static PlayWav ( string wavFilename, SoundFlags soundFlags ) : void
wavFilename string
soundFlags SoundFlags
Résultat void

SetLengthSilenceAndVolume() public static méthode

Adds silence to wav files alter volume
public static SetLengthSilenceAndVolume ( float silenceInsertLength, float maxLength, float volume, string fileName ) : void
silenceInsertLength float Milliseconds to insert at start of wav
maxLength float If the wav is longer than this then crop (includes silence), if 0 then don't crop
volume float 0=silent, 1=100%
fileName string
Résultat void

StopWav() public static méthode

public static StopWav ( ) : void
Résultat void

Truncate() public static méthode

public static Truncate ( string filename, float lengthMs ) : void
filename string
lengthMs float
Résultat void

WriteSingleChunkHeader() public static méthode

public static WriteSingleChunkHeader ( WavSingleChunkHeader header, Stream wavStream ) : void
header WavSingleChunkHeader
wavStream Stream
Résultat void