xoreos  0.0.5
Namespaces | Variables
sound.cpp File Reference

The global sound manager, handling all sound output. More...

#include <cassert>
#include <cstring>
#include <boost/scope_exit.hpp>
#include "src/common/util.h"
#include "src/common/readstream.h"
#include "src/common/strutil.h"
#include "src/common/error.h"
#include "src/common/configman.h"
#include "src/common/debug.h"
#include "src/sound/sound.h"
#include "src/sound/audiostream.h"
#include "src/sound/decoders/asf.h"
#include "src/sound/decoders/wave.h"
#include "src/events/events.h"
Include dependency graph for sound.cpp:

Go to the source code of this file.

Namespaces

 Sound
 

Variables

static const size_t kOpenALBufferCount = 5
 Control how many buffers per sound OpenAL will create. More...
 
static const size_t kOpenALBufferSize = 32768
 Number of bytes per OpenAL buffer. More...
 

Detailed Description

The global sound manager, handling all sound output.

Definition in file sound.cpp.

Variable Documentation

◆ kOpenALBufferCount

const size_t kOpenALBufferCount = 5
static

Control how many buffers per sound OpenAL will create.

Note
clone2727 says: 5 is just a safe number. Mine only reached a max of 2.

Definition at line 56 of file sound.cpp.

Referenced by Sound::SoundManager::bufferData(), and Sound::SoundManager::playAudioStream().

◆ kOpenALBufferSize

const size_t kOpenALBufferSize = 32768
static

Number of bytes per OpenAL buffer.

Note
Needs to be high enough to prevent stuttering, but low enough to prevent a noticeable lag. 32768 seems to work just fine.

Definition at line 63 of file sound.cpp.

Referenced by Sound::SoundManager::fillBuffer().