Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Variables

Const knownIds

knownIds: Array<number> = []

A list of known source IDs used to determine new sources.

Let namesUsed

namesUsed: number = 0

Functions

getName

  • getName(): string
  • Returns a unique name for a decoder.

    Returns string

getNewSource

  • Waits for pid1 to add the source with the provided name.

    Parameters

    • name: string

    Returns Promise<SourceData>

playFile

  • playFile(__namedParameters: object): Promise<Source>
  • Used to start playing a file.

    Parameters

    • __namedParameters: object
      • filePath: string

        The path to the file. Can be relative.

      • loop: number

        How many times the file should be restarted.

      • name: string

        The name you want the file to have.

      • volume: number

        The volume the file will be played at (1 being 100%).

    Returns Promise<Source>

playTone

  • playTone(__namedParameters: object): Promise<Source>
  • Used to start playing a tone.

    Parameters

    • __namedParameters: object
      • loop: number

        How many times the tone should be played.

      • name: string

        The name of the tone.

      • pitch: number

        The frequency of the tone.

      • seconds: number

        How long the tone should play.

      • type: WaveType

        The type of the tone.

      • volume: number

        The volume of the tone (1 being 100%).

    Returns Promise<Source>

Generated using TypeDoc