mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-27 20:30:15 +00:00
3a3663d9d6
SoundBuffer: move Windows only flags to DXSoundBuffer. Remove out of date _MSC_VER checks (pre-VS2019).
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "SoundBuffer.h"
|
|
|
|
class DXSoundBuffer : public SoundBuffer
|
|
{
|
|
public:
|
|
static std::shared_ptr<SoundBuffer> create(uint32_t dwBufferSize, uint32_t nSampleRate, int nChannels);
|
|
|
|
DXSoundBuffer(LPDIRECTSOUNDBUFFER pBuffer);
|
|
virtual ~DXSoundBuffer();
|
|
|
|
virtual HRESULT SetCurrentPosition(DWORD dwNewPosition);
|
|
virtual HRESULT GetCurrentPosition(LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor);
|
|
|
|
virtual HRESULT Lock(DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID* lplpvAudioPtr1, DWORD* lpdwAudioBytes1, LPVOID* lplpvAudioPtr2, DWORD* lpdwAudioBytes2, DWORD dwFlags);
|
|
virtual HRESULT Unlock(LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2);
|
|
|
|
virtual HRESULT Stop();
|
|
virtual HRESULT Play(DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags);
|
|
|
|
virtual HRESULT SetVolume(LONG lVolume);
|
|
virtual HRESULT GetVolume(LONG* lplVolume);
|
|
|
|
virtual HRESULT GetStatus(LPDWORD lpdwStatus);
|
|
virtual HRESULT Restore();
|
|
|
|
private:
|
|
const LPDIRECTSOUNDBUFFER m_pBuffer;
|
|
};
|
|
|
|
bool DSInit();
|
|
void DSUninit();
|