1 /* 2 * Copyright 2013 The Emscripten Authors. All rights reserved. 3 * Emscripten is available under two separate licenses, the MIT license and the 4 * University of Illinois/NCSA Open Source License. Both these licenses can be 5 * found in the LICENSE file. 6 */ 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <AL/alut.h> 11 12 /* 13 * This is a minimal test for error handling. 14 */ 15 main(int argc,char ** argv)16int main(int argc, char **argv) 17 { 18 ALuint buffer; 19 20 alutInit(&argc, argv); 21 buffer = alutCreateBufferFromFile("no_such_file_in_existance.wav"); 22 alutExit(); 23 24 if (buffer != AL_NONE) 25 { 26 fprintf(stderr, "expected an I/O error\n"); 27 return EXIT_FAILURE; 28 } 29 return EXIT_SUCCESS; 30 } 31