void LoadSoundClip() { if (sample != null) { sample.Dispose(); } sample = editor.sfxAudioStreams.GetSample(SkinKeys.break0); Debug.Assert(sample != null); // todo, get this when entering playing state sample.onlyPlayIfStopped = true; }
void LoadSoundClip() { if (sampleStream != null) { sampleStream.Dispose(); } string customPath = SkinManager.Instance.GetSkinItemFilepath(SkinKeys.metronome); string currentSFX = string.IsNullOrEmpty(customPath) ? defaultPath : customPath; sampleStream = AudioManager.LoadSampleStream(currentSFX, 15); }
void LoadSoundClip() { if (sample != null) { sample.Dispose(); } string customPath = SkinManager.Instance.GetSkinItemFilepath(SkinKeys.break0); string currentSFX = string.IsNullOrEmpty(customPath) ? defaultPath : customPath; sample = AudioManager.LoadSampleStream(currentSFX, 1); sample.onlyPlayIfStopped = true; }