Skip to content
Permalink
Browse files

Change calling convention for CBassAudio::PlayStreamIntern

It should match the signature of PTHREAD_START_ROUTINE
  • Loading branch information...
botder committed Sep 25, 2019
1 parent 5b07e4e commit 185f57c7483dfeec656fdd656c6dac8bf57a93f0
Showing with 10 additions and 9 deletions.
  1. +4 −3 Client/mods/deathmatch/logic/CBassAudio.cpp
  2. +6 −6 Client/mods/deathmatch/logic/CBassAudio.h
@@ -341,9 +341,9 @@ void CALLBACK BeatCallback(DWORD chan, double beatpos, void* user)
UnlockCallbackId();
}

void CBassAudio::PlayStreamIntern(void* arguments)
DWORD CBassAudio::PlayStreamIntern(LPVOID argument)
{
CBassAudio* pBassAudio = LockCallbackId(arguments);
CBassAudio* pBassAudio = LockCallbackId(argument);
if (pBassAudio)
{
pBassAudio->m_pVars->criticalSection.Lock();
@@ -355,7 +355,7 @@ void CBassAudio::PlayStreamIntern(void* arguments)
// This can take a while
HSTREAM pSound = BASS_StreamCreateURL(FromUTF8(strURL), 0, lFlags | BASS_UNICODE, NULL, NULL);

CBassAudio* pBassAudio = LockCallbackId(arguments);
CBassAudio* pBassAudio = LockCallbackId(argument);
if (pBassAudio)
{
pBassAudio->m_pVars->criticalSection.Lock();
@@ -372,6 +372,7 @@ void CBassAudio::PlayStreamIntern(void* arguments)
}

UnlockCallbackId();
return 0;
}

//
@@ -93,12 +93,12 @@ class CBassAudio
void SetSoundBPM(float fBPM) { m_fBPM = fBPM; }

protected:
HSTREAM ConvertFileToMono(const SString& strPath);
static void PlayStreamIntern(void* arguments);
void CompleteStreamConnect(HSTREAM pSound);
void ApplyFxEffects();
void ServiceVars();
void SetFinishedCallbacks();
HSTREAM ConvertFileToMono(const SString& strPath);
static DWORD WINAPI PlayStreamIntern(LPVOID argument);
void CompleteStreamConnect(HSTREAM pSound);
void ApplyFxEffects();
void ServiceVars();
void SetFinishedCallbacks();

void Process3D(const CVector& vecPlayerPosition, const CVector& vecCameraPosition, const CVector& vecLookAt);

1 comment on commit 185f57c

@botder

This comment has been minimized.

Copy link
Member Author

commented on 185f57c Sep 25, 2019

Might solve crash offset 00022902

Please sign in to comment.
You can’t perform that action at this time.