forked from Green-Sky/tomato
Merge commit '852f2a6343518919e5ca8d3c1bbcab9f493e3cd8'
This commit is contained in:
35
external/sdl/SDL/include/SDL3/SDL_audio.h
vendored
35
external/sdl/SDL/include/SDL3/SDL_audio.h
vendored
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -22,18 +22,19 @@
|
||||
/**
|
||||
* \file SDL_audio.h
|
||||
*
|
||||
* \brief Audio functionality for the SDL library.
|
||||
* Audio functionality for the SDL library.
|
||||
*/
|
||||
|
||||
#ifndef SDL_audio_h_
|
||||
#define SDL_audio_h_
|
||||
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_endian.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_mutex.h>
|
||||
#include <SDL3/SDL_thread.h>
|
||||
#include <SDL3/SDL_properties.h>
|
||||
#include <SDL3/SDL_rwops.h>
|
||||
#include <SDL3/SDL_thread.h>
|
||||
|
||||
#include <SDL3/SDL_begin_code.h>
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -53,7 +54,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Audio format flags.
|
||||
* Audio format flags.
|
||||
*
|
||||
* These are what the 16 bits in SDL_AudioFormat currently mean...
|
||||
* (Unspecified bits are always zero).
|
||||
@ -659,7 +660,7 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStre
|
||||
*
|
||||
* \param src_spec The format details of the input audio
|
||||
* \param dst_spec The format details of the output audio
|
||||
* \returns 0 on success, or -1 on error.
|
||||
* \returns a new audio stream on success, or NULL on failure.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
@ -675,6 +676,19 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_GetAudioStreamDevice(SDL_AudioStre
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAudioStream(const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);
|
||||
|
||||
/**
|
||||
* Get the properties associated with an audio stream.
|
||||
*
|
||||
* \param stream the SDL_AudioStream to query
|
||||
* \returns a valid property ID on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Query the current format of an audio stream.
|
||||
@ -1267,8 +1281,7 @@ extern DECLSPEC int SDLCALL SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid,
|
||||
* audio data allocated by the function is written to `audio_buf` and its
|
||||
* length in bytes to `audio_len`. The SDL_AudioSpec members `freq`,
|
||||
* `channels`, and `format` are set to the values of the audio data in the
|
||||
* buffer. The `samples` member is set to a sane default and all others are
|
||||
* set to zero.
|
||||
* buffer.
|
||||
*
|
||||
* It's necessary to use SDL_free() to free the audio data returned in
|
||||
* `audio_buf` when it is no longer used.
|
||||
@ -1414,9 +1427,9 @@ extern DECLSPEC int SDLCALL SDL_LoadWAV(const char *path, SDL_AudioSpec * spec,
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
|
||||
/**
|
||||
* Convert some audio data of one format to another format.
|
||||
|
Reference in New Issue
Block a user