Refactor : LPDWORD > unsigned long*

This commit is contained in:
Aaron Culliney 2015-06-07 12:13:12 -07:00
parent 7513f5e938
commit b9371d3a38
4 changed files with 8 additions and 10 deletions

View File

@ -24,7 +24,7 @@ typedef struct IDirectSoundBuffer {
int (*GetVolume)(void* _this, long *lplVolume);
int (*GetCurrentPosition)(void* _this, LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor);
int (*GetCurrentPosition)(void* _this, unsigned long *lpdwCurrentPlayCursor, unsigned long *lpdwCurrentWriteCursor);
int (*Stop)(void* _this);
@ -34,12 +34,12 @@ typedef struct IDirectSoundBuffer {
int (*Play)(void* _this, unsigned long dwReserved1, unsigned long dwReserved2, unsigned long dwFlags);
// This method obtains a valid write pointer to the sound buffer's audio data
int (*Lock)(void* _this, unsigned long dwWriteCursor, unsigned long dwWriteBytes, void **lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, void **lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, unsigned long dwFlags);
int (*Lock)(void* _this, unsigned long dwWriteCursor, unsigned long dwWriteBytes, void **lplpvAudioPtr1, unsigned long *lpdwAudioBytes1, void **lplpvAudioPtr2, unsigned long *lpdwAudioBytes2, unsigned long dwFlags);
// This method releases a locked sound buffer.
int (*Unlock)(void* _this, void *lpvAudioPtr1, unsigned long dwAudioBytes1, void *lpvAudioPtr2, unsigned long dwAudioBytes2);
int (*GetStatus)(void* _this, LPDWORD lpdwStatus);
int (*GetStatus)(void* _this, unsigned long *lpdwStatus);
int (*UnlockStaticBuffer)(void* _this, unsigned long dwAudioBytes);

View File

@ -726,13 +726,13 @@ static long OpenALCreateSoundBuffer(ALBufferParamsStruct *params, ALSoundBufferS
(*soundbuf_struct)->_this = voice;
(*soundbuf_struct)->SetVolume = (int (*)(void *, long))ALSetVolume;
(*soundbuf_struct)->GetVolume = (int (*)(void *, long *))ALGetVolume;
(*soundbuf_struct)->GetCurrentPosition = (int (*)(void *, LPDWORD, LPDWORD))ALGetPosition;
(*soundbuf_struct)->GetCurrentPosition = (int (*)(void *, unsigned long *, unsigned long *))ALGetPosition;
(*soundbuf_struct)->Stop = (int (*)(void *))ALStop;
(*soundbuf_struct)->Restore = (int (*)(void *))ALRestore;
(*soundbuf_struct)->Play = (int (*)(void *, unsigned long, unsigned long, unsigned long))ALPlay;
(*soundbuf_struct)->Lock = (int (*)(void *, unsigned long, unsigned long, void **, LPDWORD, void **, LPDWORD, unsigned long))ALBegin;
(*soundbuf_struct)->Lock = (int (*)(void *, unsigned long, unsigned long, void **, unsigned long *, void **, unsigned long *, unsigned long))ALBegin;
(*soundbuf_struct)->Unlock = (int (*)(void *, void *, unsigned long, void *, unsigned long))ALCommit;
(*soundbuf_struct)->GetStatus = (int (*)(void *, LPDWORD))ALGetStatus;
(*soundbuf_struct)->GetStatus = (int (*)(void *, unsigned long *))ALGetStatus;
// mockingboard-specific hacks
(*soundbuf_struct)->UnlockStaticBuffer = (int (*)(void *, unsigned long))ALCommitStaticBuffer;

View File

@ -12,7 +12,7 @@
#include "common.h"
#include "audio/win-shim.h"
pthread_t CreateThread(void* unused_lpThreadAttributes, int unused_dwStackSize, LPTHREAD_START_ROUTINE lpStartRoutine, void *lpParameter, unsigned long unused_dwCreationFlags, LPDWORD lpThreadId)
pthread_t CreateThread(void* unused_lpThreadAttributes, int unused_dwStackSize, LPTHREAD_START_ROUTINE lpStartRoutine, void *lpParameter, unsigned long unused_dwCreationFlags, unsigned long *lpThreadId)
{
pthread_t a_thread = 0;
int err = 0;

View File

@ -25,8 +25,6 @@
// 2013/09/19 - http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
typedef unsigned long *LPDWORD;
#if !defined(TRUE)
#define TRUE true
#endif
@ -46,7 +44,7 @@ typedef void *IUnknown;
typedef void *(*LPTHREAD_START_ROUTINE)(void *unused);
pthread_t CreateThread(void* unused_lpThreadAttributes, int unused_dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, void *lpParameter, unsigned long unused_dwCreationFlags, LPDWORD lpThreadId);
pthread_t CreateThread(void* unused_lpThreadAttributes, int unused_dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, void *lpParameter, unsigned long unused_dwCreationFlags, unsigned long *lpThreadId);
#define THREAD_PRIORITY_NORMAL 0
#define THREAD_PRIORITY_TIME_CRITICAL 15