26 lines
723 B
C#
26 lines
723 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FlowScope.Audio
|
|
{
|
|
public interface IAudioService
|
|
{
|
|
IAudioHandle PlayBgm(string key, bool loop = true, float fadeIn = 0f);
|
|
Task<IAudioHandle> PlayBgmAsync(
|
|
string key,
|
|
bool loop = true,
|
|
float fadeIn = 0f,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
IAudioHandle PlaySfx(string key);
|
|
Task<IAudioHandle> PlaySfxAsync(
|
|
string key,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
void StopBgm(float fadeOut = 0f);
|
|
void SetBgmVolume(float volume);
|
|
void SetSfxVolume(float volume);
|
|
void SetMute(bool mute);
|
|
}
|
|
}
|