Refactor the way resources are loaded (#191)
* WIP * WIP * Font works * WIP: Only Music remains * Looks like it's working * Fix oopsie * Core/ObjectRef: Add cast functions * Update ChangeLog.md * Audio/SoundStream: Make sound stream thread-safe
This commit is contained in:
@@ -5,16 +5,15 @@ SCENARIO("SoundBuffer", "[AUDIO][SOUNDBUFFER]")
|
||||
{
|
||||
GIVEN("A sound buffer")
|
||||
{
|
||||
Nz::SoundBuffer soundBuffer;
|
||||
|
||||
WHEN("We load our sound")
|
||||
{
|
||||
REQUIRE(soundBuffer.LoadFromFile("resources/Engine/Audio/Cat.flac"));
|
||||
Nz::SoundBufferRef soundBuffer = Nz::SoundBuffer::LoadFromFile("resources/Engine/Audio/Cat.flac");
|
||||
REQUIRE(soundBuffer.IsValid());
|
||||
|
||||
THEN("We can ask the informations of the file")
|
||||
{
|
||||
REQUIRE(soundBuffer.GetDuration() <= 8500); // 8s = 8000ms
|
||||
REQUIRE(soundBuffer.GetDuration() >= 8000);
|
||||
REQUIRE(soundBuffer->GetDuration() <= 8500); // 8s = 8000ms
|
||||
REQUIRE(soundBuffer->GetDuration() >= 8000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user