Skip to content

FownMOD/SimpleMusicAPI

Repository files navigation

这是什么(What it is)

SCP: 秘密实验室便捷的音频播放器
SCP: Convenient Audio Player for Secret Labs
实际应用中只要写两条代码即可播放音频
In practical applications, you only need to write two lines of code to play audio

使用(Useing)

确保已应用“NVorbis.dll”等的引用
Make sure that references such as "NVorbis.dll" are applied
在最新的释放中获取所要的dll引用
Get the desired dll reference in the latest release

代码示例(Code example)

CN:

using SimpleMusicAPI.AudioPlayer;

public class example
{
    public void FG()
    {
        AudioBase audioBase = AudioBase.Create("播放器名称",true);
        audioBase.Play("C://User//EX.ogg示例音频", false);
    }
}

English:

using SimpleMusicAPI.AudioPlayer;

public class example
{
    public void FG()
    {
        AudioBase audioBase = AudioBase.Create("AudioPlayer Name",true);
        audioBase.Play("C://User//EX.ogg AudioFilePath", false);
    }
}

API使用:

AudioBase AB = AudioBase.Get("AudioPlayerName");
AudioBase.TryGet("AudioPlayerName",out AudioBase ABBBB);