X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=snd_bsd.c;h=0e927f1e8d02fa01c37dd02482c272fa374794ce;hp=4237b6ab86080608456e0423f7315576a00f6d06;hb=ab196f09c6afcfa263e249640662cc9599ed7f4d;hpb=6d4419b45ec4e528e19542b82b68361bb2fef5f9 diff --git a/snd_bsd.c b/snd_bsd.c index 4237b6ab..0e927f1e 100644 --- a/snd_bsd.c +++ b/snd_bsd.c @@ -84,15 +84,17 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) #ifdef SUNOS info.play.encoding = AUDIO_ENCODING_LINEAR; #else -# if BYTE_ORDER == BIG_ENDIAN + if (mem_bigendian) info.play.encoding = AUDIO_ENCODING_SLINEAR_BE; -# else + else info.play.encoding = AUDIO_ENCODING_SLINEAR_LE; -# endif #endif - if (ioctl (audio_fd, AUDIO_SETINFO, &info) == 0) - break; + if (ioctl (audio_fd, AUDIO_SETINFO, &info) != 0) + { + Con_Printf("Can't set up the sound device (%s)\n", snddev); + return false; + } // TODO: check the parameters with AUDIO_GETINFO // TODO: check AUDIO_ENCODINGFLAG_EMULATED with AUDIO_GETENC @@ -194,7 +196,7 @@ unsigned int SndSys_GetSoundTime (void) if (ioctl (audio_fd, AUDIO_GETINFO, &info) < 0) { Con_Print("Error: can't get audio info\n"); - SNDDMA_Shutdown (); + SndSys_Shutdown (); return 0; } @@ -227,3 +229,15 @@ void SndSys_UnlockRenderBuffer (void) { // Nothing to do } + +/* +==================== +SndSys_SendKeyEvents + +Send keyboard events originating from the sound system (e.g. MIDI) +==================== +*/ +void SndSys_SendKeyEvents(void) +{ + // not supported +}