____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include "stratagus.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL_endian.h"
#include "iolib.h"
#include "sound_server.h"
#include "wav.h"
Go to the source code of this file.
Classes | |
| struct | WavData |
| class | CSampleWav |
| class | CSampleWavStream |
Functions | |
| CSample * | LoadWav (const std::string &name, int flags) |
| Load a wav file. | |
Definition in file wav.cpp.
| CSample* LoadWav | ( | const std::string & | name, | |
| int | flags | |||
| ) |
Load a wav file.
Load wav.
| name | File name. | |
| flags | Load flags. |
Definition at line 186 of file wav.cpp.
References Assert, CSample::BitsPerSample, WavFMT::BitsPerSample, CSample::Buffer, WavFMT::ByteRate, CSample::Channels, WavFMT::Channels, WavData::ChunkRem, CL_OPEN_READ, CFile::close(), DATA, data, WavFMT::Encoding, FMT, WavFMT::FMTchunk, WavFMT::FMTlength, CSample::Frequency, WavFMT::Frequency, CSample::Len, WavChunk::Length, WavChunk::Magic, CFile::open(), PlayAudioStream, CSample::Pos, CFile::read(), RIFF, CSample::SampleSize, WavFMT::SampleSize, CFile::seek(), SOUND_BUFFER_SIZE, WAV_MONO, WAV_PCM_CODE, WAV_STEREO, WAVE, and WavData::WavFile.
Referenced by LoadSample(), and PlayMusic().
1.5.6