wavfile.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. Copyright (C) 2004 Michael Liebscher
  3. Copyright (C) 1997-2001 Id Software, Inc.
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. */
  16. /*
  17. * wav.h: Wav file loader.
  18. *
  19. * Author: Michael Liebscher <johnnycanuck@users.sourceforge.net>
  20. * Date: 2004
  21. *
  22. * Acknowledgement:
  23. * This code was derived from Quake II, and was originally
  24. * written by Id Software, Inc.
  25. *
  26. */
  27. #ifndef __WAV_H__
  28. #define __WAV_H__
  29. // Structure used to describe a sound.
  30. typedef struct
  31. {
  32. W32 sample_rate; // Sample rate in Hz
  33. W32 channels; // Number of Channels (0x01 = Mono, 0x02 = Stereo)
  34. W32 sample_size; // Bytes per sample
  35. // 1 = 8 bit Mono
  36. // 2 = 8 bit Stereo or 16 bit Mono
  37. // 4 = 16 bit Stereo
  38. W32 samples;
  39. } soundInfo_t;
  40. extern _boolean LoadWavInfo( const char *filename, W8 **wav, soundInfo_t *info );
  41. #endif /* __WAV_H__ */