mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 21:12:55 +08:00
test: explicit samples timings
This commit is contained in:
parent
50dbf564a5
commit
f05659a1c0
@ -55,6 +55,9 @@ namespace osu.Game.Tests.Editing.Checks
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestMinorDelayedHitsounds()
|
public void TestMinorDelayedHitsounds()
|
||||||
{
|
{
|
||||||
|
// 1 ms of silence -> 1 ms of noise at 0.3 amplitude -> hitsound transient
|
||||||
|
// => The transient is delayed by 2 ms
|
||||||
|
// Waveform: https://github.com/ppy/osu/assets/39100084/d5b9edbe-0ba2-401d-94b0-6d57228bdbd3
|
||||||
using (var resourceStream = TestResources.OpenResource("Samples/hitsound-minor-delay.wav"))
|
using (var resourceStream = TestResources.OpenResource("Samples/hitsound-minor-delay.wav"))
|
||||||
{
|
{
|
||||||
var issues = check.Run(getContext(resourceStream)).ToList();
|
var issues = check.Run(getContext(resourceStream)).ToList();
|
||||||
@ -67,6 +70,9 @@ namespace osu.Game.Tests.Editing.Checks
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestDelayedHitsounds()
|
public void TestDelayedHitsounds()
|
||||||
{
|
{
|
||||||
|
// 3 ms of silence -> 3 ms of noise at 0.3 amplitude -> hitsound transient
|
||||||
|
// => The transient is delayed by 6 ms
|
||||||
|
// Waveform: https://github.com/ppy/osu/assets/39100084/2509ff35-d908-414b-b7b9-583681348772
|
||||||
using var resourceStream = TestResources.OpenResource("Samples/hitsound-delay.wav");
|
using var resourceStream = TestResources.OpenResource("Samples/hitsound-delay.wav");
|
||||||
|
|
||||||
var issues = check.Run(getContext(resourceStream)).ToList();
|
var issues = check.Run(getContext(resourceStream)).ToList();
|
||||||
@ -78,6 +84,8 @@ namespace osu.Game.Tests.Editing.Checks
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestConsequentlyDelayedHitsounds()
|
public void TestConsequentlyDelayedHitsounds()
|
||||||
{
|
{
|
||||||
|
// The hitsound is delayed by 10 ms
|
||||||
|
// Waveform: https://github.com/ppy/osu/assets/39100084/3a7ede0d-8523-4b99-a222-3624cd208267
|
||||||
using var resourceStream = TestResources.OpenResource("Samples/hitsound-consequent-delay.wav");
|
using var resourceStream = TestResources.OpenResource("Samples/hitsound-consequent-delay.wav");
|
||||||
|
|
||||||
var issues = check.Run(getContext(resourceStream)).ToList();
|
var issues = check.Run(getContext(resourceStream)).ToList();
|
||||||
|
Loading…
Reference in New Issue
Block a user