Commit cac93fb0 authored by Ghislain MARY's avatar Ghislain MARY

Fix build with Visual Studio 2008.

parent f1f76c8f
......@@ -345,8 +345,8 @@ static MSSndCard *ms_wasapi_snd_card_new(LPWSTR id, const char *name, uint8_t ca
card->name = ms_strdup(name);
card->capabilities = capabilities;
wasapicard->id_vector = new std::vector<wchar_t>(wcslen(id) + 1);
wcscpy_s(wasapicard->id_vector->data(), wasapicard->id_vector->size(), id);
wasapicard->id = wasapicard->id_vector->data();
wcscpy_s(&wasapicard->id_vector->front(), wasapicard->id_vector->size(), id);
wasapicard->id = &wasapicard->id_vector->front();
return card;
}
......
......@@ -125,10 +125,14 @@ int MSWASAPIReader::activate()
WAVEFORMATPCMEX proposedWfx;
WAVEFORMATEX *pUsedWfx = NULL;
WAVEFORMATEX *pSupportedWfx = NULL;
DWORD flags = AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED | AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE | AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED;
DWORD flags = 0;
if (!mIsInitialized) goto error;
#if BUILD_FOR_WINDOWS_PHONE
flags = AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED | AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE | AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED;
#endif
proposedWfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
proposedWfx.Format.nChannels = (WORD)mNChannels;
proposedWfx.Format.nSamplesPerSec = mRate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment