Atlas - SDL_audio_c.h
Home / ext / SDL2 / src / audio Lines: 2 | Size: 3004 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2018 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#ifndef SDL_audio_c_h_ 23#define SDL_audio_c_h_ 24 25#include "../SDL_internal.h" 26 27#ifndef DEBUG_CONVERT 28#define DEBUG_CONVERT 0 29#endif 30 31#if DEBUG_CONVERT 32#define LOG_DEBUG_CONVERT(from, to) fprintf(stderr, "Converting %s to %s.\n", from, to); 33#else 34#define LOG_DEBUG_CONVERT(from, to) 35#endif 36 37/* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */ 38 39#ifdef HAVE_LIBSAMPLERATE_H 40#include "samplerate.h" 41extern SDL_bool SRC_available; 42extern int SRC_converter; 43extern SRC_STATE* (*SRC_src_new)(int converter_type, int channels, int *error); 44extern int (*SRC_src_process)(SRC_STATE *state, SRC_DATA *data); 45extern int (*SRC_src_reset)(SRC_STATE *state); 46extern SRC_STATE* (*SRC_src_delete)(SRC_STATE *state); 47extern const char* (*SRC_src_strerror)(int error); 48#endif 49 50/* Functions to get a list of "close" audio formats */ 51extern SDL_AudioFormat SDL_FirstAudioFormat(SDL_AudioFormat format); 52extern SDL_AudioFormat SDL_NextAudioFormat(void); 53 54/* Function to calculate the size and silence for a SDL_AudioSpec */ 55extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec); 56 57/* Choose the audio filter functions below */ 58extern void SDL_ChooseAudioConverters(void); 59 60/* These pointers get set during SDL_ChooseAudioConverters() to various SIMD implementations. */ 61extern SDL_AudioFilter SDL_Convert_S8_to_F32; 62extern SDL_AudioFilter SDL_Convert_U8_to_F32; 63extern SDL_AudioFilter SDL_Convert_S16_to_F32; 64extern SDL_AudioFilter SDL_Convert_U16_to_F32; 65extern SDL_AudioFilter SDL_Convert_S32_to_F32; 66extern SDL_AudioFilter SDL_Convert_F32_to_S8; 67extern SDL_AudioFilter SDL_Convert_F32_to_U8; 68extern SDL_AudioFilter SDL_Convert_F32_to_S16; 69extern SDL_AudioFilter SDL_Convert_F32_to_U16; 70extern SDL_AudioFilter SDL_Convert_F32_to_S32; 71 72/* You need to call SDL_PrepareResampleFilter() before using the internal resampler. 73 SDL_AudioQuit() calls SDL_FreeResamplerFilter(), you should never call it yourself. */ 74extern int SDL_PrepareResampleFilter(void); 75extern void SDL_FreeResampleFilter(void); 76 77#endif /* SDL_audio_c_h_ */ 78 79/* vi: set ts=4 sw=4 expandtab: */ 80[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.