Browse Source

Audio: Apple, tell me, what makes a buffer non-undetermined?

pull/342/head
Vladimír Vondruš 7 years ago
parent
commit
32a95bb532
  1. 6
      src/Magnum/Audio/Test/SourceALTest.cpp

6
src/Magnum/Audio/Test/SourceALTest.cpp

@ -26,6 +26,7 @@
#include <Corrade/TestSuite/Tester.h>
#include "Magnum/Audio/Buffer.h"
#include "Magnum/Audio/BufferFormat.h"
#include "Magnum/Audio/Context.h"
#include "Magnum/Audio/Source.h"
@ -175,7 +176,12 @@ void SourceALTest::type() {
Source source;
CORRADE_COMPARE(source.type(), Source::Type::Undetermined);
constexpr char data[] { 25, 17, 24, 122, 67, 24, 48, 96 };
/* Need to fill the buffer with some data otherwise it's still Undetermined
on Apple's OpenAL. OpenAL Soft doesn't need that. */
Buffer buffer;
buffer.setData(BufferFormat::Mono8, data, 22050);
source.setBuffer(&buffer);
CORRADE_COMPARE(source.type(), Source::Type::Static);
}

Loading…
Cancel
Save