mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-21 09:49:01 +00:00
Reformat all the things. Have fun with merge conflicts.
This commit is contained in:
parent
2115e8a4a6
commit
3570c7f03a
1116 changed files with 187405 additions and 180344 deletions
|
@ -20,47 +20,43 @@ class AlsaSound final : public SoundStream
|
|||
{
|
||||
#if defined(HAVE_ALSA) && HAVE_ALSA
|
||||
public:
|
||||
AlsaSound();
|
||||
AlsaSound();
|
||||
|
||||
bool Start() override;
|
||||
void SoundLoop() override;
|
||||
void Stop() override;
|
||||
void Update() override;
|
||||
void Clear(bool) override;
|
||||
|
||||
static bool isValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool Start() override;
|
||||
void SoundLoop() override;
|
||||
void Stop() override;
|
||||
void Update() override;
|
||||
void Clear(bool) override;
|
||||
|
||||
static bool isValid() { return true; }
|
||||
private:
|
||||
// maximum number of frames the buffer can hold
|
||||
static constexpr size_t BUFFER_SIZE_MAX = 8192;
|
||||
// maximum number of frames the buffer can hold
|
||||
static constexpr size_t BUFFER_SIZE_MAX = 8192;
|
||||
|
||||
// minimum number of frames to deliver in one transfer
|
||||
static constexpr u32 FRAME_COUNT_MIN = 256;
|
||||
// minimum number of frames to deliver in one transfer
|
||||
static constexpr u32 FRAME_COUNT_MIN = 256;
|
||||
|
||||
// number of channels per frame
|
||||
static constexpr u32 CHANNEL_COUNT = 2;
|
||||
// number of channels per frame
|
||||
static constexpr u32 CHANNEL_COUNT = 2;
|
||||
|
||||
enum class ALSAThreadStatus
|
||||
{
|
||||
RUNNING,
|
||||
PAUSED,
|
||||
STOPPING,
|
||||
STOPPED,
|
||||
};
|
||||
enum class ALSAThreadStatus
|
||||
{
|
||||
RUNNING,
|
||||
PAUSED,
|
||||
STOPPING,
|
||||
STOPPED,
|
||||
};
|
||||
|
||||
bool AlsaInit();
|
||||
void AlsaShutdown();
|
||||
bool AlsaInit();
|
||||
void AlsaShutdown();
|
||||
|
||||
s16 mix_buffer[BUFFER_SIZE_MAX * CHANNEL_COUNT];
|
||||
std::thread thread;
|
||||
std::atomic<ALSAThreadStatus> m_thread_status;
|
||||
std::condition_variable cv;
|
||||
std::mutex cv_m;
|
||||
s16 mix_buffer[BUFFER_SIZE_MAX * CHANNEL_COUNT];
|
||||
std::thread thread;
|
||||
std::atomic<ALSAThreadStatus> m_thread_status;
|
||||
std::condition_variable cv;
|
||||
std::mutex cv_m;
|
||||
|
||||
snd_pcm_t *handle;
|
||||
unsigned int frames_to_deliver;
|
||||
snd_pcm_t* handle;
|
||||
unsigned int frames_to_deliver;
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue