Перейти к основному содержанию

SoundManager

Index

Variables

audioSources

audioSources: AudioSource[]

maxStreams

maxStreams: number

musicVolume

musicVolume: number

playingStreams

playingStreams: number

soundData

soundData: object

soundPath

soundPath: string

soundPool

soundPool: android.media.SoundPool

soundVolume

soundVolume: number

Functions

autoPause

  • autoPause(): void
  • Returns void

autoResume

  • autoResume(): void
  • Returns void

createSource

  • createSource(sourceType: SourceType, source: any, soundName: string, volume?: number, radius?: number): AudioSource
  • Parameters

    • sourceType: SourceType
    • source: any
    • soundName: string
    • optionalvolume: number
    • optionalradius: number

    Returns AudioSource

getAllSources

  • getAllSources(source: any, soundName?: string): AudioSource[]
  • Parameters

    • source: any
    • optionalsoundName: string

    Returns AudioSource[]

getSoundData

  • getSoundData(soundName: string): SoundData
  • Parameters

    • soundName: string

    Returns SoundData

getSoundDuration

  • getSoundDuration(soundName: string): any
  • Parameters

    • soundName: string

    Returns any

getSource

  • getSource(source: any, soundName?: string): AudioSource
  • Parameters

    • source: any
    • optionalsoundName: string

    Returns AudioSource

init

  • init(maxStreamsCount: number): void
  • Parameters

    • maxStreamsCount: number

    Returns void

pause

  • pause(streamID: number): void
  • Parameters

    • streamID: number

    Returns void

playSound

  • playSound(soundName: string, volume?: number, pitch?: number): number
  • Parameters

    • soundName: string
    • optionalvolume: number
    • optionalpitch: number

    Returns number

playSoundAt

  • playSoundAt(x: number, y: number, z: number, soundName: string, volume?: number, pitch?: number, radius?: number): number
  • Parameters

    • x: number
    • y: number
    • z: number
    • soundName: string
    • optionalvolume: number
    • optionalpitch: number
    • optionalradius: number

    Returns number

playSoundAtBlock

  • playSoundAtBlock(tile: any, soundName: string, volume?: number, radius?: number): number
  • Parameters

    • tile: any
    • soundName: string
    • optionalvolume: number
    • optionalradius: number

    Returns number

playSoundAtEntity

  • playSoundAtEntity(entity: number, soundName: string, volume?: number, pitch?: number, radius?: number): number
  • Parameters

    • entity: number
    • soundName: string
    • optionalvolume: number
    • optionalpitch: number
    • optionalradius: number

    Returns number

readSettings

  • readSettings(): void
  • Returns void

registerSound

  • registerSound(soundName: string, path: string | string[], looping?: boolean): void
  • Parameters

    • soundName: string
    • path: string | string[]
    • optionallooping: boolean

    Returns void

release

  • release(): void
  • Returns void

removeSource

resume

  • resume(streamID: number): void
  • Parameters

    • streamID: number

    Returns void

setResourcePath

  • setResourcePath(path: string): void
  • Parameters

    • path: string

    Returns void

setVolume

  • setVolume(streamID: number, leftVolume: number, rightVolume?: number): void
  • Parameters

    • streamID: number
    • leftVolume: number
    • optionalrightVolume: number

    Returns void

startPlaySound

  • startPlaySound(sourceType: SourceType, source: any, soundName: string, volume?: number, radius?: number): AudioSource
  • Parameters

    • sourceType: SourceType
    • source: any
    • soundName: string
    • optionalvolume: number
    • optionalradius: number

    Returns AudioSource

stop

  • stop(streamID: number): void
  • Parameters

    • streamID: number

    Returns void

stopAll

  • stopAll(): void
  • Returns void

stopPlaySound

  • stopPlaySound(source: any, soundName?: string): boolean
  • Parameters

    • source: any
    • optionalsoundName: string

    Returns boolean

tick

  • tick(): void
  • Returns void