summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/BASS_interface/Bass_interface.h6
-rw-r--r--plugins/BASS_interface/Main.cpp24
2 files changed, 18 insertions, 12 deletions
diff --git a/plugins/BASS_interface/Bass_interface.h b/plugins/BASS_interface/Bass_interface.h
index e42e85127b..75585eb693 100644
--- a/plugins/BASS_interface/Bass_interface.h
+++ b/plugins/BASS_interface/Bass_interface.h
@@ -26,6 +26,12 @@ Copyright (C) 2010, 2011 tico-tico
#define BASSDEF(f) (WINAPI *f)
#include "bass.h"
+#if defined( _UNICODE )
+ #define BASS_TCHAR BASS_UNICODE
+#else
+ #define BASS_TCHAR 0
+#endif
+
#define LOADBASSFUNCTION(f) (*((void**)&f)=(void*)GetProcAddress(hBass,#f))
#define MIID_BASSINT {0x2f07ea05, 0x05b5, 0x4ff0, { 0x87, 0x5d, 0xc5, 0x90, 0xda, 0x2d, 0xda, 0xc1 }} //2f07ea05-05b5-4ff0-875d-c590da2ddac1
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp
index 8f7a82ae80..fa214604b9 100644
--- a/plugins/BASS_interface/Main.cpp
+++ b/plugins/BASS_interface/Main.cpp
@@ -53,7 +53,7 @@ static HWND ClistHWND;
static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
{
- char * pszFile = (char *) lParam; SYSTEMTIME systime; WORD currtime, currstat; BOOL doPlay = TRUE;
+ TCHAR* ptszFile = (TCHAR*) lParam; SYSTEMTIME systime; WORD currtime, currstat; BOOL doPlay = TRUE;
GetLocalTime(&systime);
currtime = MAKEWORD(systime.wMinute, systime.wHour);
@@ -61,15 +61,15 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
currstat = 1;
switch (CallService(MS_CLIST_GETSTATUSMODE, 0, 0))
{
- case ID_STATUS_OUTTOLUNCH: currstat <<= 1;
- case ID_STATUS_ONTHEPHONE: currstat <<= 1;
- case ID_STATUS_INVISIBLE: currstat <<= 1;
- case ID_STATUS_FREECHAT: currstat <<= 1;
- case ID_STATUS_DND: currstat <<= 1;
- case ID_STATUS_OCCUPIED: currstat <<= 1;
- case ID_STATUS_NA: currstat <<= 1;
- case ID_STATUS_AWAY: currstat <<= 1;
- case ID_STATUS_ONLINE: currstat <<= 1;
+ case ID_STATUS_OUTTOLUNCH: currstat <<= 1;
+ case ID_STATUS_ONTHEPHONE: currstat <<= 1;
+ case ID_STATUS_INVISIBLE: currstat <<= 1;
+ case ID_STATUS_FREECHAT: currstat <<= 1;
+ case ID_STATUS_DND: currstat <<= 1;
+ case ID_STATUS_OCCUPIED: currstat <<= 1;
+ case ID_STATUS_NA: currstat <<= 1;
+ case ID_STATUS_AWAY: currstat <<= 1;
+ case ID_STATUS_ONLINE: currstat <<= 1;
}
if ( !DBGetContactSettingByte(NULL,"Skin","UseSound",0)) doPlay = FALSE;
@@ -84,12 +84,12 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
if ( Preview || (int)wParam==1 ) doPlay = TRUE;
- if ( !pszFile ) doPlay = FALSE;
+ if ( !ptszFile ) doPlay = FALSE;
if ( doPlay )
{
BASS_StreamFree(sndSSnd[sndNSnd]);
- sndSSnd[sndNSnd] = BASS_StreamCreateFile(FALSE, pszFile, 0, 0, BASS_STREAM_AUTOFREE);
+ sndSSnd[sndNSnd] = BASS_StreamCreateFile(FALSE, ptszFile, 0, 0, BASS_TCHAR | BASS_STREAM_AUTOFREE);
BASS_ChannelPlay(sndSSnd[sndNSnd], FALSE);
sndNSnd = (sndNSnd+1)%sndLimSnd;
}