mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
rebuilt SDL2 for osx and windows from official SDL2-2.0.7 release.
osx version has SDL changeset r11654 applied to fix a minor issue. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1522 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
2b8f031b62
commit
97b5dfc86d
37 changed files with 449 additions and 49 deletions
|
@ -164,6 +164,15 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
|||
|
||||
/**
|
||||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||
*
|
||||
* For multi-channel audio, the default SDL channel mapping is:
|
||||
* 2: FL FR (stereo)
|
||||
* 3: FL FR LFE (2.1 surround)
|
||||
* 4: FL FR BL BR (quad)
|
||||
* 5: FL FR FC BL BR (quad + center)
|
||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||
*/
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
|
@ -477,6 +486,132 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
||||
/* SDL_AudioStream is a new audio conversion interface.
|
||||
The benefits vs SDL_AudioCVT:
|
||||
- it can handle resampling data in chunks without generating
|
||||
artifacts, when it doesn't have the complete buffer available.
|
||||
- it can handle incoming data in any variable size.
|
||||
- You push data as you have it, and pull it when you need it
|
||||
*/
|
||||
/* this is opaque to the outside world. */
|
||||
struct _SDL_AudioStream;
|
||||
typedef struct _SDL_AudioStream SDL_AudioStream;
|
||||
|
||||
/**
|
||||
* Create a new audio stream
|
||||
*
|
||||
* \param src_format The format of the source audio
|
||||
* \param src_channels The number of channels of the source audio
|
||||
* \param src_rate The sampling rate of the source audio
|
||||
* \param dst_format The format of the desired audio output
|
||||
* \param dst_channels The number of channels of the desired audio output
|
||||
* \param dst_rate The sampling rate of the desired audio output
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
|
||||
const Uint8 src_channels,
|
||||
const int src_rate,
|
||||
const SDL_AudioFormat dst_format,
|
||||
const Uint8 dst_channels,
|
||||
const int dst_rate);
|
||||
|
||||
/**
|
||||
* Add data to be converted/resampled to the stream
|
||||
*
|
||||
* \param stream The stream the audio data is being added to
|
||||
* \param buf A pointer to the audio data to add
|
||||
* \param int The number of bytes to write to the stream
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get converted/resampled data from the stream
|
||||
*
|
||||
* \param stream The stream the audio is being requested from
|
||||
* \param buf A buffer to fill with audio data
|
||||
* \param len The maximum number of bytes to fill
|
||||
* \return The number of bytes read from the stream, or -1 on error
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get the number of converted/resampled bytes available. The stream may be
|
||||
* buffering data behind the scenes until it has enough to resample
|
||||
* correctly, so this number might be lower than what you expect, or even
|
||||
* be zero. Add more data or flush the stream if you need the data now.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Tell the stream that you're done sending data, and anything being buffered
|
||||
* should be converted/resampled and made available immediately.
|
||||
*
|
||||
* It is legal to add more data to a stream after flushing, but there will
|
||||
* be audio gaps in the output. Generally this is intended to signal the
|
||||
* end of input, so the complete output becomes available.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Clear any pending data in the stream without converting it
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Free an audio stream
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
/**
|
||||
* This takes two audio buffers of the playing audio format and mixes
|
||||
|
@ -532,7 +667,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
|||
* \param dev The device ID to which we will queue audio.
|
||||
* \param data The data to queue to the device for later playback.
|
||||
* \param len The number of bytes (not samples!) to which (data) points.
|
||||
* \return zero on success, -1 on error.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_GetQueuedAudioSize
|
||||
* \sa SDL_ClearQueuedAudio
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
@ -66,7 +67,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
@ -70,7 +71,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#ifndef SDL_config_os2_h_
|
||||
#define SDL_config_os2_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
@ -29,18 +30,13 @@
|
|||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
/* Enable the OS/2 audio driver (src/audio/os2/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
/* Enable the OS/2 video driver (src/video/os2/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
@ -48,11 +44,11 @@
|
|||
/* Enable Vulkan support */
|
||||
/* #undef SDL_VIDEO_VULKAN */
|
||||
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
#define SDL_POWER_OS2 1
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
#define SDL_POWER_OS2 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
|
@ -102,7 +98,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
|
@ -150,6 +145,9 @@
|
|||
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -106,6 +106,20 @@ typedef enum
|
|||
} SDL_JoystickPowerLevel;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Locking for multi-threaded access to the joystick API
|
||||
*
|
||||
* If you are using the joystick API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the joysticks.
|
||||
*
|
||||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
|
||||
/**
|
||||
* Count the number of joysticks attached to the system right now
|
||||
*/
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-11524:8df7a59b5528"
|
||||
#define SDL_REVISION_NUMBER 11524
|
||||
#define SDL_REVISION "hg-11645:2088cd828335"
|
||||
#define SDL_REVISION_NUMBER 11645
|
||||
|
|
|
@ -363,6 +363,37 @@ extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
|||
extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
|
||||
typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
|
||||
typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
||||
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
|
||||
/**
|
||||
* \brief Get the current set of SDL memory functions
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
SDL_calloc_func *calloc_func,
|
||||
SDL_realloc_func *realloc_func,
|
||||
SDL_free_func *free_func);
|
||||
|
||||
/**
|
||||
* \brief Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \note If you are replacing SDL's memory functions, you should call
|
||||
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
||||
* That means that your free function will be called with memory
|
||||
* allocated by the previous memory allocation functions.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
SDL_calloc_func calloc_func,
|
||||
SDL_realloc_func realloc_func,
|
||||
SDL_free_func free_func);
|
||||
|
||||
/**
|
||||
* \brief Get the number of outstanding (unfreed) allocations
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
|||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 6
|
||||
#define SDL_PATCHLEVEL 7
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.6</string>
|
||||
<string>2.0.7</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.6</string>
|
||||
<string>2.0.7</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,34 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.7:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added audio stream conversion functions:
|
||||
SDL_NewAudioStream
|
||||
SDL_AudioStreamPut
|
||||
SDL_AudioStreamGet
|
||||
SDL_AudioStreamAvailable
|
||||
SDL_AudioStreamFlush
|
||||
SDL_AudioStreamClear
|
||||
SDL_FreeAudioStream
|
||||
* Added functions to query and set the SDL memory allocation functions:
|
||||
SDL_GetMemoryFunctions()
|
||||
SDL_SetMemoryFunctions()
|
||||
SDL_GetNumAllocations()
|
||||
* Added locking functions for multi-threaded access to the joystick and game controller APIs:
|
||||
SDL_LockJoysticks()
|
||||
SDL_UnlockJoysticks()
|
||||
* The following functions are now thread-safe:
|
||||
SDL_SetEventFilter()
|
||||
SDL_GetEventFilter()
|
||||
SDL_AddEventWatch()
|
||||
SDL_DelEventWatch()
|
||||
|
||||
|
||||
General:
|
||||
---------------------------------------------------------------------------
|
||||
2.0.6:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -40,7 +40,7 @@ while test $# -gt 0; do
|
|||
lib_suffix=$optarg
|
||||
;;
|
||||
--version)
|
||||
echo 2.0.6
|
||||
echo 2.0.7
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${prefix}/include -Dmain=SDL_main
|
||||
|
|
|
@ -164,6 +164,15 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
|||
|
||||
/**
|
||||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||
*
|
||||
* For multi-channel audio, the default SDL channel mapping is:
|
||||
* 2: FL FR (stereo)
|
||||
* 3: FL FR LFE (2.1 surround)
|
||||
* 4: FL FR BL BR (quad)
|
||||
* 5: FL FR FC BL BR (quad + center)
|
||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||
*/
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
|
@ -477,6 +486,132 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
||||
/* SDL_AudioStream is a new audio conversion interface.
|
||||
The benefits vs SDL_AudioCVT:
|
||||
- it can handle resampling data in chunks without generating
|
||||
artifacts, when it doesn't have the complete buffer available.
|
||||
- it can handle incoming data in any variable size.
|
||||
- You push data as you have it, and pull it when you need it
|
||||
*/
|
||||
/* this is opaque to the outside world. */
|
||||
struct _SDL_AudioStream;
|
||||
typedef struct _SDL_AudioStream SDL_AudioStream;
|
||||
|
||||
/**
|
||||
* Create a new audio stream
|
||||
*
|
||||
* \param src_format The format of the source audio
|
||||
* \param src_channels The number of channels of the source audio
|
||||
* \param src_rate The sampling rate of the source audio
|
||||
* \param dst_format The format of the desired audio output
|
||||
* \param dst_channels The number of channels of the desired audio output
|
||||
* \param dst_rate The sampling rate of the desired audio output
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
|
||||
const Uint8 src_channels,
|
||||
const int src_rate,
|
||||
const SDL_AudioFormat dst_format,
|
||||
const Uint8 dst_channels,
|
||||
const int dst_rate);
|
||||
|
||||
/**
|
||||
* Add data to be converted/resampled to the stream
|
||||
*
|
||||
* \param stream The stream the audio data is being added to
|
||||
* \param buf A pointer to the audio data to add
|
||||
* \param int The number of bytes to write to the stream
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get converted/resampled data from the stream
|
||||
*
|
||||
* \param stream The stream the audio is being requested from
|
||||
* \param buf A buffer to fill with audio data
|
||||
* \param len The maximum number of bytes to fill
|
||||
* \return The number of bytes read from the stream, or -1 on error
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get the number of converted/resampled bytes available. The stream may be
|
||||
* buffering data behind the scenes until it has enough to resample
|
||||
* correctly, so this number might be lower than what you expect, or even
|
||||
* be zero. Add more data or flush the stream if you need the data now.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Tell the stream that you're done sending data, and anything being buffered
|
||||
* should be converted/resampled and made available immediately.
|
||||
*
|
||||
* It is legal to add more data to a stream after flushing, but there will
|
||||
* be audio gaps in the output. Generally this is intended to signal the
|
||||
* end of input, so the complete output becomes available.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Clear any pending data in the stream without converting it
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Free an audio stream
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
/**
|
||||
* This takes two audio buffers of the playing audio format and mixes
|
||||
|
@ -532,7 +667,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
|||
* \param dev The device ID to which we will queue audio.
|
||||
* \param data The data to queue to the device for later playback.
|
||||
* \param len The number of bytes (not samples!) to which (data) points.
|
||||
* \return zero on success, -1 on error.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_GetQueuedAudioSize
|
||||
* \sa SDL_ClearQueuedAudio
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
@ -66,7 +67,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
@ -70,7 +71,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#ifndef SDL_config_os2_h_
|
||||
#define SDL_config_os2_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
@ -29,18 +30,13 @@
|
|||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
/* Enable the OS/2 audio driver (src/audio/os2/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
/* Enable the OS/2 video driver (src/video/os2/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
@ -48,11 +44,11 @@
|
|||
/* Enable Vulkan support */
|
||||
/* #undef SDL_VIDEO_VULKAN */
|
||||
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
#define SDL_POWER_OS2 1
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
#define SDL_POWER_OS2 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
|
@ -102,7 +98,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
|
@ -150,6 +145,9 @@
|
|||
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
|
@ -106,6 +106,20 @@ typedef enum
|
|||
} SDL_JoystickPowerLevel;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Locking for multi-threaded access to the joystick API
|
||||
*
|
||||
* If you are using the joystick API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the joysticks.
|
||||
*
|
||||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
|
||||
/**
|
||||
* Count the number of joysticks attached to the system right now
|
||||
*/
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-11524:8df7a59b5528"
|
||||
#define SDL_REVISION_NUMBER 11524
|
||||
#define SDL_REVISION "hg-11645:2088cd828335"
|
||||
#define SDL_REVISION_NUMBER 11645
|
||||
|
|
|
@ -363,6 +363,37 @@ extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
|||
extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
|
||||
typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
|
||||
typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
||||
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
|
||||
/**
|
||||
* \brief Get the current set of SDL memory functions
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
SDL_calloc_func *calloc_func,
|
||||
SDL_realloc_func *realloc_func,
|
||||
SDL_free_func *free_func);
|
||||
|
||||
/**
|
||||
* \brief Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \note If you are replacing SDL's memory functions, you should call
|
||||
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
||||
* That means that your free function will be called with memory
|
||||
* allocated by the previous memory allocation functions.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
SDL_calloc_func calloc_func,
|
||||
SDL_realloc_func realloc_func,
|
||||
SDL_free_func free_func);
|
||||
|
||||
/**
|
||||
* \brief Get the number of outstanding (unfreed) allocations
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
|||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 6
|
||||
#define SDL_PATCHLEVEL 7
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,6 +19,11 @@ SDL_AtomicTryLock
|
|||
SDL_AtomicUnlock
|
||||
SDL_AudioInit
|
||||
SDL_AudioQuit
|
||||
SDL_AudioStreamAvailable
|
||||
SDL_AudioStreamClear
|
||||
SDL_AudioStreamFlush
|
||||
SDL_AudioStreamGet
|
||||
SDL_AudioStreamPut
|
||||
SDL_BuildAudioCVT
|
||||
SDL_CalculateGammaRamp
|
||||
SDL_CaptureMouse
|
||||
|
@ -80,6 +85,7 @@ SDL_FillRects
|
|||
SDL_FilterEvents
|
||||
SDL_FlushEvent
|
||||
SDL_FlushEvents
|
||||
SDL_FreeAudioStream
|
||||
SDL_FreeCursor
|
||||
SDL_FreeFormat
|
||||
SDL_FreePalette
|
||||
|
@ -166,9 +172,11 @@ SDL_GetKeyFromScancode
|
|||
SDL_GetKeyName
|
||||
SDL_GetKeyboardFocus
|
||||
SDL_GetKeyboardState
|
||||
SDL_GetMemoryFunctions
|
||||
SDL_GetModState
|
||||
SDL_GetMouseFocus
|
||||
SDL_GetMouseState
|
||||
SDL_GetNumAllocations
|
||||
SDL_GetNumAudioDevices
|
||||
SDL_GetNumAudioDrivers
|
||||
SDL_GetNumDisplayModes
|
||||
|
@ -329,6 +337,7 @@ SDL_LoadObject
|
|||
SDL_LoadWAV_RW
|
||||
SDL_LockAudio
|
||||
SDL_LockAudioDevice
|
||||
SDL_LockJoysticks
|
||||
SDL_LockMutex
|
||||
SDL_LockSurface
|
||||
SDL_LockTexture
|
||||
|
@ -359,6 +368,7 @@ SDL_MinimizeWindow
|
|||
SDL_MixAudio
|
||||
SDL_MixAudioFormat
|
||||
SDL_MouseIsHaptic
|
||||
SDL_NewAudioStream
|
||||
SDL_NumHaptics
|
||||
SDL_NumJoysticks
|
||||
SDL_OpenAudio
|
||||
|
@ -437,6 +447,7 @@ SDL_SetEventFilter
|
|||
SDL_SetHint
|
||||
SDL_SetHintWithPriority
|
||||
SDL_SetMainReady
|
||||
SDL_SetMemoryFunctions
|
||||
SDL_SetModState
|
||||
SDL_SetPaletteColors
|
||||
SDL_SetPixelFormatPalette
|
||||
|
@ -490,6 +501,7 @@ SDL_UnionRect
|
|||
SDL_UnloadObject
|
||||
SDL_UnlockAudio
|
||||
SDL_UnlockAudioDevice
|
||||
SDL_UnlockJoysticks
|
||||
SDL_UnlockMutex
|
||||
SDL_UnlockSurface
|
||||
SDL_UnlockTexture
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
++'_SDL_AtomicUnlock'.'SDL2.DLL'..'SDL_AtomicUnlock'
|
||||
++'_SDL_AudioInit'.'SDL2.DLL'..'SDL_AudioInit'
|
||||
++'_SDL_AudioQuit'.'SDL2.DLL'..'SDL_AudioQuit'
|
||||
++'_SDL_AudioStreamAvailable'.'SDL2.DLL'..'SDL_AudioStreamAvailable'
|
||||
++'_SDL_AudioStreamClear'.'SDL2.DLL'..'SDL_AudioStreamClear'
|
||||
++'_SDL_AudioStreamFlush'.'SDL2.DLL'..'SDL_AudioStreamFlush'
|
||||
++'_SDL_AudioStreamGet'.'SDL2.DLL'..'SDL_AudioStreamGet'
|
||||
++'_SDL_AudioStreamPut'.'SDL2.DLL'..'SDL_AudioStreamPut'
|
||||
++'_SDL_BuildAudioCVT'.'SDL2.DLL'..'SDL_BuildAudioCVT'
|
||||
++'_SDL_CalculateGammaRamp'.'SDL2.DLL'..'SDL_CalculateGammaRamp'
|
||||
++'_SDL_CaptureMouse'.'SDL2.DLL'..'SDL_CaptureMouse'
|
||||
|
@ -77,6 +82,7 @@
|
|||
++'_SDL_FilterEvents'.'SDL2.DLL'..'SDL_FilterEvents'
|
||||
++'_SDL_FlushEvent'.'SDL2.DLL'..'SDL_FlushEvent'
|
||||
++'_SDL_FlushEvents'.'SDL2.DLL'..'SDL_FlushEvents'
|
||||
++'_SDL_FreeAudioStream'.'SDL2.DLL'..'SDL_FreeAudioStream'
|
||||
++'_SDL_FreeCursor'.'SDL2.DLL'..'SDL_FreeCursor'
|
||||
++'_SDL_FreeFormat'.'SDL2.DLL'..'SDL_FreeFormat'
|
||||
++'_SDL_FreePalette'.'SDL2.DLL'..'SDL_FreePalette'
|
||||
|
@ -163,9 +169,11 @@
|
|||
++'_SDL_GetKeyName'.'SDL2.DLL'..'SDL_GetKeyName'
|
||||
++'_SDL_GetKeyboardFocus'.'SDL2.DLL'..'SDL_GetKeyboardFocus'
|
||||
++'_SDL_GetKeyboardState'.'SDL2.DLL'..'SDL_GetKeyboardState'
|
||||
++'_SDL_GetMemoryFunctions'.'SDL2.DLL'..'SDL_GetMemoryFunctions'
|
||||
++'_SDL_GetModState'.'SDL2.DLL'..'SDL_GetModState'
|
||||
++'_SDL_GetMouseFocus'.'SDL2.DLL'..'SDL_GetMouseFocus'
|
||||
++'_SDL_GetMouseState'.'SDL2.DLL'..'SDL_GetMouseState'
|
||||
++'_SDL_GetNumAllocations'.'SDL2.DLL'..'SDL_GetNumAllocations'
|
||||
++'_SDL_GetNumAudioDevices'.'SDL2.DLL'..'SDL_GetNumAudioDevices'
|
||||
++'_SDL_GetNumAudioDrivers'.'SDL2.DLL'..'SDL_GetNumAudioDrivers'
|
||||
++'_SDL_GetNumDisplayModes'.'SDL2.DLL'..'SDL_GetNumDisplayModes'
|
||||
|
@ -326,6 +334,7 @@
|
|||
++'_SDL_LoadWAV_RW'.'SDL2.DLL'..'SDL_LoadWAV_RW'
|
||||
++'_SDL_LockAudio'.'SDL2.DLL'..'SDL_LockAudio'
|
||||
++'_SDL_LockAudioDevice'.'SDL2.DLL'..'SDL_LockAudioDevice'
|
||||
++'_SDL_LockJoysticks'.'SDL2.DLL'..'SDL_LockJoysticks'
|
||||
++'_SDL_LockMutex'.'SDL2.DLL'..'SDL_LockMutex'
|
||||
++'_SDL_LockSurface'.'SDL2.DLL'..'SDL_LockSurface'
|
||||
++'_SDL_LockTexture'.'SDL2.DLL'..'SDL_LockTexture'
|
||||
|
@ -356,6 +365,7 @@
|
|||
++'_SDL_MixAudio'.'SDL2.DLL'..'SDL_MixAudio'
|
||||
++'_SDL_MixAudioFormat'.'SDL2.DLL'..'SDL_MixAudioFormat'
|
||||
++'_SDL_MouseIsHaptic'.'SDL2.DLL'..'SDL_MouseIsHaptic'
|
||||
++'_SDL_NewAudioStream'.'SDL2.DLL'..'SDL_NewAudioStream'
|
||||
++'_SDL_NumHaptics'.'SDL2.DLL'..'SDL_NumHaptics'
|
||||
++'_SDL_NumJoysticks'.'SDL2.DLL'..'SDL_NumJoysticks'
|
||||
++'_SDL_OpenAudio'.'SDL2.DLL'..'SDL_OpenAudio'
|
||||
|
@ -434,6 +444,7 @@
|
|||
++'_SDL_SetHint'.'SDL2.DLL'..'SDL_SetHint'
|
||||
++'_SDL_SetHintWithPriority'.'SDL2.DLL'..'SDL_SetHintWithPriority'
|
||||
++'_SDL_SetMainReady'.'SDL2.DLL'..'SDL_SetMainReady'
|
||||
++'_SDL_SetMemoryFunctions'.'SDL2.DLL'..'SDL_SetMemoryFunctions'
|
||||
++'_SDL_SetModState'.'SDL2.DLL'..'SDL_SetModState'
|
||||
++'_SDL_SetPaletteColors'.'SDL2.DLL'..'SDL_SetPaletteColors'
|
||||
++'_SDL_SetPixelFormatPalette'.'SDL2.DLL'..'SDL_SetPixelFormatPalette'
|
||||
|
@ -487,6 +498,7 @@
|
|||
++'_SDL_UnloadObject'.'SDL2.DLL'..'SDL_UnloadObject'
|
||||
++'_SDL_UnlockAudio'.'SDL2.DLL'..'SDL_UnlockAudio'
|
||||
++'_SDL_UnlockAudioDevice'.'SDL2.DLL'..'SDL_UnlockAudioDevice'
|
||||
++'_SDL_UnlockJoysticks'.'SDL2.DLL'..'SDL_UnlockJoysticks'
|
||||
++'_SDL_UnlockMutex'.'SDL2.DLL'..'SDL_UnlockMutex'
|
||||
++'_SDL_UnlockSurface'.'SDL2.DLL'..'SDL_UnlockSurface'
|
||||
++'_SDL_UnlockTexture'.'SDL2.DLL'..'SDL_UnlockTexture'
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue