-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudioplayer.h
36 lines (32 loc) · 970 Bytes
/
audioplayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef AUDIOPLAYER_H
#define AUDIOPLAYER_H
#include "audioplayerthread.h"
using namespace std;
namespace EdenClass
{
class AudioPlayer : public QObject
{
Q_OBJECT
public:
AudioPlayer();
~AudioPlayer();
int *GetPossibleSampleRates();
void SetParams(int SampleRate, int SampleSize, int Channels);
void SetParams(int SampleRate, int SampleSize, int Channels, int AudioBufSize, int AudioBufInterval);
void PlayStart();
void PlayStop();
void BufferFlush();
void PutToBuffer(char* Buf, int BufLen);
void PutToBuffer(short* Buf, int BufLen);
int GetAudioRemaining();
void PutSilenceToBuffer(int Len);
void FillAudioBuffer();
string *GetDeviceList();
bool SelectDevice(string DeviceName);
bool SelectDevice(int DeviceNo);
private:
QThread * APT_;
AudioPlayerThread * APT;
};
}
#endif // AUDIOPLAYER_H