Show / Hide Table of Contents

Class SndFile

Connects to DAGGER.SND to enumerate and extract sound data.

Inheritance
Object
SndFile
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class SndFile

Constructors

| Improve this Doc View Source

SndFile()

Default constructor.

Declaration
public SndFile()
| Improve this Doc View Source

SndFile(String, FileUsage, Boolean)

Load constructor.

Declaration
public SndFile(string filePath, FileUsage usage, bool readOnly)
Parameters
Type Name Description
String filePath

Absolute path to DAGGER.SND.

FileUsage usage

Determines if the BSA file will read from disk or memory.

Boolean readOnly

File will be read-only if true, read-write if false.

Fields

| Improve this Doc View Source

SampleRate

Declaration
public const int SampleRate = 11025
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

BsaFile

BSA file for sound effects.

Declaration
public BsaFile BsaFile { get; }
Property Value
Type Description
BsaFile
| Improve this Doc View Source

Count

Number of BSA records in DAGGER.SND.

Declaration
public int Count { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Filename

Gets default DAGGER.SND filename.

Declaration
public static string Filename { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

DiscardSound(Int32)

Discard a sound from memory.

Declaration
public void DiscardSound(int sound)
Parameters
Type Name Description
Int32 sound

Index of sound to discard.

| Improve this Doc View Source

GetRecordIndex(UInt32)

Gets index of sound record with specified id.

Declaration
public int GetRecordIndex(uint id)
Parameters
Type Name Description
UInt32 id

ID of mesh.

Returns
Type Description
Int32

Index of sound if located, or -1 if not found.

| Improve this Doc View Source

GetSound(Int32, out DFSound)

Get a sound from index.

Declaration
public bool GetSound(int sound, out DFSound soundOut)
Parameters
Type Name Description
Int32 sound

SoundEffect.

DFSound soundOut

Sound data out.

Returns
Type Description
Boolean

True if successful.

| Improve this Doc View Source

GetStream(Int32)

Helper method to get an entire WAV file in a memory stream.

Declaration
public MemoryStream GetStream(int sound)
Parameters
Type Name Description
Int32 sound

Sound index.

Returns
Type Description
MemoryStream

Wave file in MemoryStream.

| Improve this Doc View Source

IsValidIndex(Int32)

Quickly check if sound index in valid range.

Declaration
public bool IsValidIndex(int sound)
Parameters
Type Name Description
Int32 sound

Index of sound.

Returns
Type Description
Boolean

True if index is within a valid range.

| Improve this Doc View Source

Load(String, FileUsage, Boolean)

Load DAGGER.SND file.

Declaration
public bool Load(string filePath, FileUsage usage, bool readOnly)
Parameters
Type Name Description
String filePath

Absolute path to DAGGER.SND file.

FileUsage usage

Specify if file will be accessed from disk, or loaded into RAM.

Boolean readOnly

File will be read-only if true, read-write if false.

Returns
Type Description
Boolean

True if successful, otherwise false.

  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • SndFile()
    • SndFile(String, FileUsage, Boolean)
  • Fields
    • SampleRate
  • Properties
    • BsaFile
    • Count
    • Filename
  • Methods
    • DiscardSound(Int32)
    • GetRecordIndex(UInt32)
    • GetSound(Int32, out DFSound)
    • GetStream(Int32)
    • IsValidIndex(Int32)
    • Load(String, FileUsage, Boolean)
Back to top Generated by DocFX