X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=snd_oss.c;h=05f91c92ff50ded803d3f5d9712294a692eece33;hp=c3a67aaf7be3397e8adb38cdf0531c984a28874d;hb=8d2492ac4364e1a51e7f84c6ea1c34429f060939;hpb=2ad43d300d4b56da3a012cb0fd4470f9314af464 diff --git a/snd_oss.c b/snd_oss.c index c3a67aaf..05f91c92 100644 --- a/snd_oss.c +++ b/snd_oss.c @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // OSS module, used by Linux and FreeBSD +#include "quakedef.h" #include #include @@ -27,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#include "quakedef.h" #include "snd_main.h" @@ -46,7 +46,7 @@ Create "snd_renderbuffer" with the proper sound format if the call is successful May return a suggested format if the requested format isn't available ==================== */ -qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) +qbool SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) { int flags, ioctl_param, prev_value; unsigned int fragmentsize; @@ -61,7 +61,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) if (suggested != NULL) { - memcpy(suggested, requested, sizeof(suggested)); + memcpy(suggested, requested, sizeof(*suggested)); if (requested->width < 1) suggested->width = 1; @@ -116,7 +116,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) { if (ioctl_param != prev_value && suggested != NULL) { - memcpy(suggested, requested, sizeof(suggested)); + memcpy(suggested, requested, sizeof(*suggested)); if (ioctl_param == AFMT_S16_NE) suggested->width = 2; @@ -137,7 +137,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) { if (ioctl_param != requested->channels && suggested != NULL) { - memcpy(suggested, requested, sizeof(suggested)); + memcpy(suggested, requested, sizeof(*suggested)); suggested->channels = ioctl_param; } @@ -154,7 +154,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) { if ((unsigned int)ioctl_param != requested->speed && suggested != NULL) { - memcpy(suggested, requested, sizeof(suggested)); + memcpy(suggested, requested, sizeof(*suggested)); suggested->speed = ioctl_param; } @@ -312,7 +312,7 @@ SndSys_LockRenderBuffer Get the exclusive lock on "snd_renderbuffer" ==================== */ -qboolean SndSys_LockRenderBuffer (void) +qbool SndSys_LockRenderBuffer (void) { // Nothing to do return true; @@ -330,3 +330,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 +}