From edc7c4fda8b2cfca3458324ad5071234732b3808 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 27 Jun 2013 17:15:22 +0000 Subject: added bass_interface support git-svn-id: http://svn.miranda-ng.org/main/trunk@5156 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/indsnd.cpp | 9 ++++++--- plugins/NewXstatusNotify/src/main.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/NewXstatusNotify') diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 6e7976a788..9d4a2d1675 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -43,7 +43,7 @@ void PreviewSound(HWND hList) else { PathToAbsoluteT(buff, stzSoundPath); - PlaySound(stzSoundPath, NULL, SND_ASYNC | SND_FILENAME); + SkinPlaySoundFile(stzSoundPath); } } @@ -72,13 +72,16 @@ TCHAR *SelectSound(HWND hwndDlg, TCHAR *buff) ofn.hwndOwner = GetParent(hwndDlg); ofn.hInstance = hInst; TCHAR filter[MAX_PATH]; - mir_sntprintf(filter, SIZEOF(filter), _T("%s (*.wav)%c*.WAV%c%s (*.*)%c*%c"), TranslateT("Wave Files"), 0, 0, TranslateT("All Files"), 0, 0); + if (GetModuleHandle(_T("bass_interface.dll"))) + mir_sntprintf(filter, SIZEOF(filter), _T("%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%s (*.*)%c*%c"), TranslateT("Sound files"), 0, 0, TranslateT("All files"), 0, 0); + else + mir_sntprintf(filter, SIZEOF(filter), _T("%s (*.wav)%c*.wav%c%s (*.*)%c*%c"), TranslateT("Wave files"), 0, 0, TranslateT("All files"), 0, 0); ofn.lpstrFilter = filter; ofn.lpstrFile = buff; ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_NOCHANGEDIR; ofn.nMaxFile = MAX_PATH; ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrDefExt = _T("wav"); + ofn.lpstrDefExt = _T(""); if (GetOpenFileName(&ofn)) return buff; diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 6e0057b537..52c2bf8583 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -726,7 +726,7 @@ void PlayChangeSound(HANDLE hContact, WORD oldStatus, WORD newStatus) //Now make path to IndSound absolute, as it isn't registered TCHAR stzSoundPath[MAX_PATH]; PathToAbsoluteT(stzSoundFile, stzSoundPath); - PlaySound(stzSoundPath, NULL, SND_ASYNC | SND_FILENAME | SND_NOSTOP); + SkinPlaySoundFile(stzSoundPath); return; } } -- cgit v1.2.3