mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-29 05:36:36 +00:00
AlsaSound: fix buffer type, clean up macros
This commit is contained in:
parent
16957fcaec
commit
6c28ea58ab
2 changed files with 14 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue