2015-10-11 19:06:05 +02:00
|
|
|
#ifndef WAVE_H
|
|
|
|
#define WAVE_H
|
|
|
|
|
2015-10-11 19:15:50 +02:00
|
|
|
#include <mutex>
|
2015-10-11 19:06:05 +02:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Wave {
|
|
|
|
public:
|
2016-04-24 22:02:49 +02:00
|
|
|
Wave(const std::string &filename);
|
2015-10-11 19:06:05 +02:00
|
|
|
Wave(const Wave &rhs);
|
|
|
|
~Wave();
|
|
|
|
|
|
|
|
Wave &operator=(const Wave &rhs);
|
|
|
|
|
|
|
|
void play() const;
|
2015-10-11 19:15:50 +02:00
|
|
|
void playAsync() const;
|
2015-10-11 19:06:05 +02:00
|
|
|
|
|
|
|
private:
|
2016-04-24 22:02:49 +02:00
|
|
|
static std::mutex _playMutex;
|
2015-10-11 19:06:05 +02:00
|
|
|
|
2016-04-24 22:02:49 +02:00
|
|
|
const std::string _filename;
|
|
|
|
const std::string _command;
|
2015-10-11 19:06:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|