29#include "../../devices/PAudioOut.h"
31#include "../../utility/PEBLPath.h"
32#include "../../utility/PError.h"
33#include "../../base/Evaluator.h"
38 unsigned long framesPerBuffer,
39 const PaStreamCallbackTimeInfo *timeInfo,
40 const PaStreamCallbackFlags statusFlags,
void *userData );
69 SDL_FreeWAV(mWave.
audio);
86 fprintf(stderr,
"Couldn't load %s: %s\n", mFileName, SDL_GetError());
90 cout <<
"------------------------------------\n";
91 cout <<
"Loading Sound File. Specs:\n";
92 cout <<
"Frequency: [" << mWave.
spec.freq <<
"]\n";
93 cout <<
"Format: [" << mWave.
spec.format <<
"]\n";
94 cout <<
"Channels: [" << mWave.
spec.channels <<
"]\n";
95 cout <<
"Silence: [" << mWave.
spec.silence <<
"]\n";
96 cout <<
"Samples: [" << mWave.
spec.samples <<
"]\n";
97 cout <<
"Size: [" << mWave.
spec.size <<
"]\n";
98 cout <<
"------------------------------------\n";
101 mWave.
spec.userdata = &mWave;
111 if (mLoaded && SDL_OpenAudio(&mWave.
spec,
NULL) < 0 ) {
112 fprintf(stderr,
"Couldn't open audio: %s\n", SDL_GetError());
141 while(SDL_GetAudioStatus() == SDL_AUDIO_PLAYING)
177 SDL_MixAudio(stream, waveptr, len, SDL_MIX_MAXVOLUME);
184 SDL_MixAudio(stream, waveptr, waveleft, SDL_MIX_MAXVOLUME);
std::string FindFile(const string &filename)
void SignalFatalError(const std::string &message)