____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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 <string.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#include <theora/theora.h>
#include "SDL.h"
#include "SDL_endian.h"
#include "iolib.h"
#include "movie.h"
#include "sound_server.h"
Go to the source code of this file.
Classes | |
| class | CSampleVorbis |
| class | CSampleVorbisStream |
Functions | |
| int | OggGetNextPage (ogg_page *page, ogg_sync_state *sync, CFile *f) |
| int | VorbisProcessData (OggData *data, char *buffer) |
| int | OggInit (CFile *f, OggData *data) |
| void | OggFree (OggData *data) |
| int | VorbisStreamRead (CSample *sample, OggData *data, void *buf, int len) |
| CSample * | LoadVorbis (const std::string &name, int flags) |
| Load a vorbis file. | |
Definition in file ogg.cpp.
| CSample* LoadVorbis | ( | const std::string & | name, | |
| int | flags | |||
| ) |
Load a vorbis file.
Load vorbis.
| name | File name. | |
| flags | Load flags. |
Definition at line 392 of file ogg.cpp.
References OggData::audio, CSample::Buffer, CSample::Channels, CL_OPEN_READ, CFile::close(), CSampleVorbis::Data, OggData::File, CSample::Frequency, int(), CSample::Len, OggFree(), OggInit(), CFile::open(), PlayAudioStream, CSample::Pos, CFile::read(), CSample::SampleSize, CFile::seek(), SOUND_BUFFER_SIZE, CFile::tell(), OggData::vinfo, and VorbisStreamRead().
Referenced by LoadSample(), PlayMovie(), and PlayMusic().
| void OggFree | ( | OggData * | data | ) |
Definition at line 299 of file ogg.cpp.
References OggData::astream, OggData::audio, OggData::sync, OggData::tcomment, OggData::tinfo, OggData::tstate, OggData::vblock, OggData::vcomment, OggData::vdsp, OggData::video, OggData::vinfo, and OggData::vstream.
Referenced by LoadVorbis(), PlayMovie(), and CSampleVorbisStream::~CSampleVorbisStream().
| int OggGetNextPage | ( | ogg_page * | page, | |
| ogg_sync_state * | sync, | |||
| CFile * | f | |||
| ) |
Definition at line 83 of file ogg.cpp.
References CFile::read().
Referenced by OggInit(), TheoraProcessData(), and VorbisProcessData().
Definition at line 153 of file ogg.cpp.
References OggData::astream, OggData::audio, OggGetNextPage(), OggData::page, CFile::read(), CFile::seek(), OggData::sync, OggData::tcomment, OggData::tinfo, OggData::tstate, OggData::vblock, OggData::vcomment, OggData::vdsp, OggData::video, OggData::vinfo, and OggData::vstream.
Referenced by LoadVorbis(), and PlayMovie().
| int VorbisProcessData | ( | OggData * | data, | |
| char * | buffer | |||
| ) |
Definition at line 100 of file ogg.cpp.
References OggData::astream, OggData::File, OggGetNextPage(), OggData::page, OggData::sync, OggData::vblock, OggData::vdsp, and OggData::vinfo.
Referenced by VorbisStreamRead().
Definition at line 320 of file ogg.cpp.
References CSample::Buffer, CSample::Len, CSample::Pos, SOUND_BUFFER_SIZE, and VorbisProcessData().
Referenced by LoadVorbis(), and CSampleVorbisStream::Read().
1.5.6