Aufgrund einer Wartung wird GitLab am 18.01. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 18.01. between 8:00 and 9:00 am.

VAUAudiofileSignalSource.cs 685 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class VAUAudiofileSignalSource : VAUSignalSource {

    public string FilePath;
    public string Name;
    public bool IsLooping = true;
    public bool PlayOnStart = true;

    // Use this for initialization
    void Awake()
    {
        _ID = VAUAdapter.VA.CreateAudiofileSignalSource(FilePath, Name);
        Debug.Assert(_ID.Length > 0);
    }

    // Use this for initialization
    void Start()
    {
        VAUAdapter.VA.SetAudiofileSignalSourceIsLooping(_ID, IsLooping);
        if( PlayOnStart )
            VAUAdapter.VA.SetAudiofileSignalSourcePlaybackAction(_ID, "PLAY");
    }
}