Files
pokerth/src/gui/qt/sound/sdlplayer.h
T

66 lines
955 B
C++
Raw Normal View History

2007-06-01 21:34:27 +00:00
//
// C++ Interface: sdlplayer
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
2007-06-02 23:23:21 +00:00
#include <QtCore>
2007-06-01 21:34:27 +00:00
#ifndef SDLPLAYER_H
#define SDLPLAYER_H
#ifdef _WIN32
#include <SDL.h>
#include <SDL_mixer.h>
#else
#ifdef __APPLE__
#include <SDL.h>
#include <SDL_mixer.h>
#else
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
#endif
#endif
2007-06-01 21:34:27 +00:00
#include <string>
2007-06-13 09:27:28 +00:00
#include "configfile.h"
2007-06-01 21:34:27 +00:00
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
2007-06-02 23:23:21 +00:00
class SDLPlayer : public QObject{
Q_OBJECT
2007-06-01 21:34:27 +00:00
public:
2007-06-13 09:27:28 +00:00
SDLPlayer(ConfigFile*);
2007-06-01 21:34:27 +00:00
~SDLPlayer();
2007-06-01 21:34:27 +00:00
void initAudio();
2007-06-12 23:13:18 +00:00
void playSound(std::string, int playerID);
2007-06-01 21:34:27 +00:00
void audioDone();
void closeAudio();
private:
int audio_rate;
Uint16 audio_format;
int audio_channels;
int audio_buffers;
2007-06-02 23:23:21 +00:00
Mix_Chunk *sound;
2007-06-03 10:03:54 +00:00
Uint8 *soundData;
2007-06-02 23:23:21 +00:00
int currentChannel;
2007-06-01 21:34:27 +00:00
2007-06-04 23:34:49 +00:00
bool audioEnabled;
2007-06-13 09:27:28 +00:00
ConfigFile *myConfig;
2007-06-01 21:34:27 +00:00
};
#endif