Etterna 0.74.4
Loading...
Searching...
No Matches
RageSoundDriver_PulseAudio.h
1#ifndef RAGE_SOUND_PULSEAUDIO_H
2#define RAGE_SOUND_PULSEAUDIO_H
3
4#include "RageUtil/Sound/RageSound.h"
5#include "RageUtil/Misc/RageThreads.h"
6#include "RageSoundDriver.h"
7#include <pulse/pulseaudio.h>
8
10{
11 public:
14
15 std::string Init();
16
17 inline int64_t GetPosition() const;
18 inline int GetSampleRate() const { return m_SampleRate; };
19
20 protected:
21 int64_t m_LastPosition;
22 int m_SampleRate;
23 char* m_Error;
24
25 void m_InitStream();
26 RageSemaphore m_Sem;
27
28 pa_threaded_mainloop* m_PulseMainLoop;
29 pa_context* m_PulseCtx;
30 pa_stream* m_PulseStream;
31
32 public:
33 void CtxStateCb(pa_context* c);
34 void StreamStateCb(pa_stream* s);
35 void StreamWriteCb(pa_stream* s, size_t length);
36
37 static void StaticCtxStateCb(pa_context* c, void* user);
38 static void StaticStreamStateCb(pa_stream* s, void* user);
39 static void StaticStreamWriteCb(pa_stream* s, size_t length, void* user);
40};
41
42#endif /* RAGE_SOUND_PULSEAUDIO_H */
Definition RageThreads.h:334
Definition RageSoundDriver_PulseAudio.h:10
Definition RageSoundDriver.h:15