project64/Source/Project64-audio/Driver/DirectSound.h

41 lines
1.6 KiB
C
Raw Normal View History

2017-09-21 13:20:36 +00:00
/****************************************************************************
* *
* Project64-audio - A Nintendo 64 audio plugin. *
* http://www.pj64-emu.com/ *
* Copyright (C) 2017 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include "SoundBase.h"
class DirectSoundDriver :
public SoundDriverBase
{
enum { DS_SEGMENTS = 4 };
public:
DirectSoundDriver();
bool Initialize();
void StopAudio(); // Stops the Audio PlayBack (as if paused)
void StartAudio(); // Starts the Audio PlayBack (as if unpaused)
2017-10-13 00:44:08 +00:00
void SetFrequency(uint32_t Frequency, uint32_t BufferSize);
2017-09-25 12:00:04 +00:00
void SetVolume(uint32_t Volume);
2017-09-21 13:20:36 +00:00
private:
static uint32_t __stdcall stAudioThreadProc(DirectSoundDriver * _this) { _this->AudioThreadProc(); return 0; }
void SetSegmentSize(uint32_t length, uint32_t SampleRate);
void AudioThreadProc();
bool m_AudioIsDone;
uint32_t m_LOCK_SIZE;
void * m_lpds;
void * m_lpdsb;
void * m_lpdsbuf;
void * m_handleAudioThread;
uint32_t m_dwAudioThreadId;
2017-10-13 00:44:08 +00:00
};