aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Birks <admin@daftgames.net>2014-01-28 11:41:10 +0000
committerCharlie Birks <admin@daftgames.net>2014-01-28 11:41:10 +0000
commit96bd7bff27531061261f324d793ff22b79f157cd (patch)
tree8579e4584aeb5503180e68f73ed9a0059def96db
parent894165f66739cc2880f26d61a6be9279c511cb10 (diff)
start to add tests
-rw-r--r--tests/openal_playback.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/openal_playback.cpp b/tests/openal_playback.cpp
index 13d619e6..ccaebbfc 100644
--- a/tests/openal_playback.cpp
+++ b/tests/openal_playback.cpp
@@ -95,9 +95,21 @@ int main() {
alBufferData(buffers[0], format, &buffer[offset], size - offset, frequency);
+ ALint val;
+ alGetBufferi(buffers[0], AL_FREQUENCY, &val);
+ assert(val == frequency);
+ alGetBufferi(buffers[0], AL_SIZE, &val);
+ assert(val == size - offset);
+ alGetBufferi(buffers[0], AL_BITS, &val);
+ assert(val == bits);
+ alGetBufferi(buffers[0], AL_CHANNELS, &val);
+ assert(val == channels);
+
ALuint sources[1];
alGenSources(1, sources);
+ assert(alIsSource(sources[0]));
+
alSourcei(sources[0], AL_BUFFER, buffers[0]);
ALint state;