Documentation for module: Audio
Former-commit-id: 4546f9db5579c219d708f87b7062104d24ec6da2
This commit is contained in:
21
tests/Engine/Audio/SoundBuffer.cpp
Normal file
21
tests/Engine/Audio/SoundBuffer.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <Nazara/Audio/SoundBuffer.hpp>
|
||||
#include <Catch/catch.hpp>
|
||||
|
||||
SCENARIO("SoundBuffer", "[AUDIO][SOUNDBUFFER]")
|
||||
{
|
||||
GIVEN("A sound buffer")
|
||||
{
|
||||
Nz::SoundBuffer soundBuffer;
|
||||
|
||||
WHEN("We load our sound")
|
||||
{
|
||||
REQUIRE(soundBuffer.LoadFromFile("resources/Engine/Audio/Cat.flac"));
|
||||
|
||||
THEN("We can ask the informations of the file")
|
||||
{
|
||||
REQUIRE(soundBuffer.GetDuration() <= 8500); // 8s = 8000ms
|
||||
REQUIRE(soundBuffer.GetDuration() >= 8000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user