From 303b61f6c52b8d34bb9c9ab7827f771832be4365 Mon Sep 17 00:00:00 2001 From: angel Date: Sun, 5 Oct 2003 18:21:27 +0000 Subject: [PATCH] More error control in the SGI driver. git-svn-id: file:///home/angel/tmp/svn-triptico/ahxm/trunk@13 c87de0a0-a11c-0410-a1e5-866214bc28b2 --- out_sgi.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/out_sgi.c b/out_sgi.c index 17c2aaf..289c4c2 100644 --- a/out_sgi.c +++ b/out_sgi.c @@ -51,15 +51,21 @@ int _out_open_sgi(char * file) if(!ac) return(-100); /* set stereo, 16 bit, signed */ - alSetChannels(ac, AL_STEREO); - alSetWidth(ac, AL_SAMPLE_16); - alSetSampFmt(ac, AL_SAMPFMT_TWOSCOMP); + if(alSetChannels(ac, AL_STEREO)==-1) + return(-101); - alSetDevice(ac, AL_DEFAULT_OUTPUT); + if(alSetWidth(ac, AL_SAMPLE_16)==-1) + return(-102); + + if(alSetSampFmt(ac, AL_SAMPFMT_TWOSCOMP)==-1) + return(-103); + + if(alSetDevice(ac, AL_DEFAULT_OUTPUT)==-1) + return(-104); ap=alOpenPort("Ann Hell", "w", ac); - if(!ap) return(-101); + if(!ap) return(-105); return(0); } -- 2.11.4.GIT