parent
e3e99d0af0
commit
e6a55d4c99
|
@ -3,6 +3,7 @@
|
||||||
// Copyright(C) 2001-2021 Project64
|
// Copyright(C) 2001-2021 Project64
|
||||||
// Copyright(C) 2000-2015 Azimer
|
// Copyright(C) 2000-2015 Azimer
|
||||||
// GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html
|
// GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <Common/SyncEvent.h>
|
#include <Common/SyncEvent.h>
|
||||||
#include <Common/CriticalSection.h>
|
#include <Common/CriticalSection.h>
|
||||||
|
@ -24,11 +25,11 @@ public:
|
||||||
virtual void StopAudio();
|
virtual void StopAudio();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum { MAX_SIZE = 48000 * 2 * 2 }; // Max Buffer Size (44100Hz * 16bit * Stereo)
|
enum { MAX_SIZE = 48000 * 2 * 2 }; // Max buffer size (44100Hz * 16-bit * stereo)
|
||||||
|
|
||||||
virtual bool Initialize();
|
virtual bool Initialize();
|
||||||
void LoadAiBuffer(uint8_t *start, uint32_t length); // Reads in length amount of audio bytes
|
void LoadAiBuffer(uint8_t *start, uint32_t length); // Reads in length amount of audio bytes
|
||||||
uint32_t m_MaxBufferSize; // Variable size determined by Playback rate
|
uint32_t m_MaxBufferSize; // Variable size determined by playback rate
|
||||||
CriticalSection m_CS;
|
CriticalSection m_CS;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -38,7 +39,7 @@ private:
|
||||||
uint8_t *m_AI_DMAPrimaryBuffer, *m_AI_DMASecondaryBuffer;
|
uint8_t *m_AI_DMAPrimaryBuffer, *m_AI_DMASecondaryBuffer;
|
||||||
uint32_t m_AI_DMAPrimaryBytes, m_AI_DMASecondaryBytes;
|
uint32_t m_AI_DMAPrimaryBytes, m_AI_DMASecondaryBytes;
|
||||||
uint32_t m_BufferRemaining; // Buffer remaining
|
uint32_t m_BufferRemaining; // Buffer remaining
|
||||||
uint32_t m_CurrentReadLoc; // Currently playing Buffer
|
uint32_t m_CurrentReadLoc; // Currently playing buffer
|
||||||
uint32_t m_CurrentWriteLoc; // Currently writing Buffer
|
uint32_t m_CurrentWriteLoc; // Currently writing buffer
|
||||||
uint8_t m_Buffer[MAX_SIZE]; // Emulated buffers
|
uint8_t m_Buffer[MAX_SIZE]; // Emulated buffers
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue