mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
AlsaSound: fix buffer type, clean up macros
This commit is contained in:
@ -21,7 +21,6 @@ class AlsaSound final : public SoundStream
|
||||
#if defined(HAVE_ALSA) && HAVE_ALSA
|
||||
public:
|
||||
AlsaSound();
|
||||
virtual ~AlsaSound();
|
||||
|
||||
bool Start() override;
|
||||
void SoundLoop() override;
|
||||
@ -35,6 +34,15 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
// 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;
|
||||
|
||||
// number of channels per frame
|
||||
static constexpr u32 CHANNEL_COUNT = 2;
|
||||
|
||||
enum class ALSAThreadStatus
|
||||
{
|
||||
RUNNING,
|
||||
@ -45,7 +53,7 @@ private:
|
||||
bool AlsaInit();
|
||||
void AlsaShutdown();
|
||||
|
||||
u8 *mix_buffer;
|
||||
s16 mix_buffer[BUFFER_SIZE_MAX * CHANNEL_COUNT];
|
||||
std::thread thread;
|
||||
std::atomic<ALSAThreadStatus> m_thread_status;
|
||||
std::condition_variable cv;
|
||||
|
Reference in New Issue
Block a user