Atlas - SDL_wave.h

Home / ext / SDL2 / src / audio Lines: 1 | Size: 2687 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#include "../SDL_internal.h" 22 23/* WAVE files are little-endian */ 24 25/*******************************************/ 26/* Define values for Microsoft WAVE format */ 27/*******************************************/ 28#define RIFF 0x46464952 /* "RIFF" */ 29#define WAVE 0x45564157 /* "WAVE" */ 30#define FACT 0x74636166 /* "fact" */ 31#define LIST 0x5453494c /* "LIST" */ 32#define BEXT 0x74786562 /* "bext" */ 33#define JUNK 0x4B4E554A /* "JUNK" */ 34#define FMT 0x20746D66 /* "fmt " */ 35#define DATA 0x61746164 /* "data" */ 36#define PCM_CODE 0x0001 37#define MS_ADPCM_CODE 0x0002 38#define IEEE_FLOAT_CODE 0x0003 39#define IMA_ADPCM_CODE 0x0011 40#define MP3_CODE 0x0055 41#define EXTENSIBLE_CODE 0xFFFE 42#define WAVE_MONO 1 43#define WAVE_STEREO 2 44 45/* Normally, these three chunks come consecutively in a WAVE file */ 46typedef struct WaveFMT 47{ 48/* Not saved in the chunk we read: 49 Uint32 FMTchunk; 50 Uint32 fmtlen; 51*/ 52 Uint16 encoding; 53 Uint16 channels; /* 1 = mono, 2 = stereo */ 54 Uint32 frequency; /* One of 11025, 22050, or 44100 Hz */ 55 Uint32 byterate; /* Average bytes per second */ 56 Uint16 blockalign; /* Bytes per sample block */ 57 Uint16 bitspersample; /* One of 8, 12, 16, or 4 for ADPCM */ 58} WaveFMT; 59 60/* The general chunk found in the WAVE file */ 61typedef struct Chunk 62{ 63 Uint32 magic; 64 Uint32 length; 65 Uint8 *data; 66} Chunk; 67 68typedef struct WaveExtensibleFMT 69{ 70 WaveFMT format; 71 Uint16 size; 72 Uint16 validbits; 73 Uint32 channelmask; 74 Uint8 subformat[16]; /* a GUID. */ 75} WaveExtensibleFMT; 76 77/* vi: set ts=4 sw=4 expandtab: */ 78
[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.