mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-04-05 12:37:41 +00:00
Move DSXXX function to a more specific location. . DSAvailable() is not implemented in SoundCore. . DSInit() & DSUninit(); are only meaningful in Windows. SoundBuffer: use plain C++ to clean it up as opposed to COM interfaces. . which are only relevant to the Win32 implementation. Remove 2 obsolete FMT macros. NTSC: load bitmaps by resource id. SoundBuffer: make creation of a SoundBuffer an atomic operation. Fix 2019 solution.
26 lines
899 B
C++
26 lines
899 B
C++
#pragma once
|
|
|
|
class SoundBuffer
|
|
{
|
|
public:
|
|
virtual ~SoundBuffer() = default;
|
|
|
|
virtual HRESULT SetCurrentPosition(DWORD dwNewPosition) = 0;
|
|
virtual HRESULT GetCurrentPosition(LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) = 0;
|
|
|
|
virtual HRESULT Lock(DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID* lplpvAudioPtr1, DWORD* lpdwAudioBytes1, LPVOID* lplpvAudioPtr2, DWORD* lpdwAudioBytes2, DWORD dwFlags) = 0;
|
|
virtual HRESULT Unlock(LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) = 0;
|
|
|
|
virtual HRESULT Stop() = 0;
|
|
virtual HRESULT Play(DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) = 0;
|
|
|
|
virtual HRESULT SetVolume(LONG lVolume) = 0;
|
|
virtual HRESULT GetVolume(LONG* lplVolume) = 0;
|
|
|
|
virtual HRESULT GetStatus(LPDWORD lpdwStatus) = 0;
|
|
virtual HRESULT Restore() = 0;
|
|
};
|
|
|
|
// this must be reimplemented in each platform
|
|
bool DSAvailable();
|