From: <man...@us...> - 2013-06-16 11:53:27
|
Revision: 2387 http://sourceforge.net/p/modplug/code/2387 Author: manxorist Date: 2013-06-16 11:53:17 +0000 (Sun, 16 Jun 2013) Log Message: ----------- [Ref] Replace 'VOID' with 'void' in soundlib and sounddev. Modified Paths: -------------- trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDevices.h trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/Mmcmp.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/common/typedefs.h 2013-06-16 11:53:17 UTC (rev 2387) @@ -278,7 +278,6 @@ // openmpt assumes these type have exact WIN32 semantics -#define VOID void typedef std::int32_t BOOL; typedef std::uint8_t BYTE; typedef std::uint16_t WORD; @@ -294,8 +293,7 @@ typedef std::uint32_t UINT; typedef std::uint32_t ULONG; typedef std::uint64_t ULONGLONG; -typedef VOID * LPVOID; -typedef VOID * PVOID; +typedef void * LPVOID; typedef BYTE * LPBYTE; typedef WORD * LPWORD; typedef DWORD * LPDWORD; Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-06-16 11:53:17 UTC (rev 2387) @@ -49,7 +49,7 @@ } -VOID ISoundDevice::Configure(HWND hwnd, UINT LatencyMS, UINT UpdateIntervalMS, DWORD fdwCfgOptions) +void ISoundDevice::Configure(HWND hwnd, UINT LatencyMS, UINT UpdateIntervalMS, DWORD fdwCfgOptions) //------------------------------------------------------------------------------------------------- { if(LatencyMS < SNDDEV_MINLATENCY_MS) LatencyMS = SNDDEV_MINLATENCY_MS; @@ -75,7 +75,7 @@ } -void ISoundDevice::SourceAudioRead(PVOID pData, ULONG NumSamples) +void ISoundDevice::SourceAudioRead(void* pData, ULONG NumSamples) //--------------------------------------------------------------- { m_Source->AudioRead(pData, NumSamples); @@ -702,7 +702,7 @@ } -VOID CWaveDevice::WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR, DWORD_PTR) +void CWaveDevice::WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR, DWORD_PTR) //-------------------------------------------------------------------------------------------- { if ((uMsg == MM_WOM_DONE) && (dwUser)) @@ -1487,7 +1487,7 @@ } CLSID clsid = gAsioDrivers[nDevice].clsid; - if (CoCreateInstance(clsid,0,CLSCTX_INPROC_SERVER, clsid, (VOID **)&m_pAsioDrv) == S_OK) + if (CoCreateInstance(clsid,0,CLSCTX_INPROC_SERVER, clsid, (void **)&m_pAsioDrv) == S_OK) { m_pAsioDrv->init((void *)m_hWnd); } else Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-06-16 11:53:17 UTC (rev 2387) @@ -40,7 +40,7 @@ { public: virtual void FillAudioBufferLocked(IFillAudioBuffer &callback) = 0; // take any locks needed while rendering audio and then call FillAudioBuffer - virtual void AudioRead(PVOID pData, ULONG NumSamples) = 0; + virtual void AudioRead(void* pData, ULONG NumSamples) = 0; virtual void AudioDone(ULONG NumSamples, ULONG SamplesLatency) = 0; // all in samples virtual void AudioDone(ULONG NumSamples) = 0; // all in samples }; @@ -106,7 +106,7 @@ protected: virtual void FillAudioBuffer() = 0; void SourceFillAudioBufferLocked(); - void SourceAudioRead(PVOID pData, ULONG NumSamples); + void SourceAudioRead(void* pData, ULONG NumSamples); void SourceAudioDone(ULONG NumSamples, ULONG SamplesLatency); public: @@ -116,7 +116,7 @@ ISoundSource *GetSource() const { return m_Source; } public: - VOID Configure(HWND hwnd, UINT LatencyMS, UINT UpdateIntervalMS, DWORD fdwCfgOptions); + void Configure(HWND hwnd, UINT LatencyMS, UINT UpdateIntervalMS, DWORD fdwCfgOptions); float GetRealLatencyMS() const { return m_RealLatencyMS; } float GetRealUpdateIntervalMS() const { return m_RealUpdateIntervalMS; } bool IsPlaying() const { return m_IsPlaying; } Modified: trunk/OpenMPT/sounddev/SoundDevices.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevices.h 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/sounddev/SoundDevices.h 2013-06-16 11:53:17 UTC (rev 2387) @@ -132,7 +132,7 @@ int64 GetStreamPositionSamples() const; public: - static VOID CALLBACK WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD_PTR, DWORD_PTR dw1, DWORD_PTR dw2); + static void CALLBACK WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD_PTR, DWORD_PTR dw1, DWORD_PTR dw2); static BOOL EnumerateDevices(UINT nIndex, LPSTR pszDescription, UINT cbSize); }; Modified: trunk/OpenMPT/soundlib/Fastmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Fastmix.cpp 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/soundlib/Fastmix.cpp 2013-06-16 11:53:17 UTC (rev 2387) @@ -374,10 +374,10 @@ ////////////////////////////////////////////////////////// // Interfaces -typedef VOID (* LPMIXINTERFACE)(ModChannel *, const CResampler *, int *, int *); +typedef void (* LPMIXINTERFACE)(ModChannel *, const CResampler *, int *, int *); #define BEGIN_MIX_INTERFACE(func)\ - VOID func(ModChannel *pChannel, const CResampler *pResampler, int *pbuffer, int *pbufmax)\ + void func(ModChannel *pChannel, const CResampler *pResampler, int *pbuffer, int *pbufmax)\ {\ UNREFERENCED_PARAMETER(pResampler);\ LONG nPos; Modified: trunk/OpenMPT/soundlib/Mmcmp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Mmcmp.cpp 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/soundlib/Mmcmp.cpp 2013-06-16 11:53:17 UTC (rev 2387) @@ -355,7 +355,7 @@ } -VOID XPK_DoUnpack(const BYTE *src, UINT, BYTE *dst, int len) +void XPK_DoUnpack(const BYTE *src, UINT, BYTE *dst, int len) { static BYTE xpk_table[] = { 2,3,4,5,6,7,8,0,3,2,4,5,6,7,8,0,4,3,5,2,6,7,8,0,5,4, 6,2,3,7,8,0,6,5,7,2,3,4,8,0,7,6,8,2,3,4,5,0,8,7,6,2,3,4,5,0 }; @@ -614,7 +614,7 @@ } -VOID PP20_DoUnpack(const BYTE *pSrc, UINT nSrcLen, BYTE *pDst, UINT nDstLen) +void PP20_DoUnpack(const BYTE *pSrc, UINT nSrcLen, BYTE *pDst, UINT nDstLen) { PPBITBUFFER BitBuffer; ULONG nBytesLeft; Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-06-16 09:53:08 UTC (rev 2386) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-06-16 11:53:17 UTC (rev 2387) @@ -62,7 +62,7 @@ #endif -typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels +typedef void (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels #include "pattern.h" #include "patternContainer.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |