]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_oss.c
a little extra error checking in keynum lookup
[xonotic/darkplaces.git] / snd_oss.c
index 4579e40d640c2352da25e4cdef47268c28224468..9d0856d88106ede6793735614987c23de325104c 100644 (file)
--- a/snd_oss.c
+++ b/snd_oss.c
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <sys/mman.h>
 #include <sys/shm.h>
 #include <sys/wait.h>
-#include <linux/soundcard.h>
+#include <sys/soundcard.h>
 #include <stdio.h>
 #include "quakedef.h"
 
@@ -239,8 +239,6 @@ int SNDDMA_GetDMAPos(void)
                snd_inited = 0;
                return 0;
        }
-//     shm->samplepos = (count.bytes / (shm->samplebits / 8)) & (shm->samples-1);
-//     fprintf(stderr, "%d    \r", count.ptr);
        shm->samplepos = count.ptr / (shm->samplebits / 8);
 
        return shm->samplepos;
@@ -267,3 +265,11 @@ void SNDDMA_Submit(void)
 {
 }
 
+void *S_LockBuffer(void)
+{
+       return shm->buffer;
+}
+
+void S_UnlockBuffer(void)
+{
+}