Ensures that we can build using VS 2012 on Windows.

See more details at https://code.google.com/p/webrtc/issues/detail?id=1146&

TBR=Niklas
BUG=1146

Review URL: https://webrtc-codereview.appspot.com/939028

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3162 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrika@webrtc.org
2012-11-26 09:12:02 +00:00
parent 221b11af22
commit 5ba3decc94
3 changed files with 34 additions and 33 deletions

View File

@@ -160,7 +160,7 @@ Channel::CalcStatistics(
_lastPayloadType = rtpInfo.header.payloadType; _lastPayloadType = rtpInfo.header.payloadType;
bool newPayload = true; bool newPayload = true;
ACMTestPayloadStats* currentPayloadStr; ACMTestPayloadStats* currentPayloadStr = NULL;
for(n = 0; n < MAX_NUM_PAYLOADS; n++) for(n = 0; n < MAX_NUM_PAYLOADS; n++)
{ {
if(rtpInfo.header.payloadType == _payloadStats[n].payloadType) if(rtpInfo.header.payloadType == _payloadStats[n].payloadType)

View File

@@ -3471,6 +3471,8 @@ DWORD AudioDeviceWindowsCore::DoRenderThread()
_Lock(); _Lock();
IAudioClock* clock = NULL;
// Get size of rendering buffer (length is expressed as the number of audio frames the buffer can hold). // Get size of rendering buffer (length is expressed as the number of audio frames the buffer can hold).
// This value is fixed during the rendering session. // This value is fixed during the rendering session.
// //
@@ -3525,7 +3527,6 @@ DWORD AudioDeviceWindowsCore::DoRenderThread()
_writtenSamples += bufferLength; _writtenSamples += bufferLength;
IAudioClock* clock = NULL;
hr = _ptrClientOut->GetService(__uuidof(IAudioClock), (void**)&clock); hr = _ptrClientOut->GetService(__uuidof(IAudioClock), (void**)&clock);
if (FAILED(hr)) { if (FAILED(hr)) {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id,
@@ -3629,7 +3630,7 @@ DWORD AudioDeviceWindowsCore::DoRenderThread()
WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, "output state has been modified during unlocked period"); WEBRTC_TRACE(kTraceCritical, kTraceAudioDevice, _id, "output state has been modified during unlocked period");
goto Exit; goto Exit;
} }
if (nSamples != _playBlockSize) if (nSamples != static_cast<WebRtc_Word32>(_playBlockSize))
{ {
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "nSamples(%d) != _playBlockSize(%d)", nSamples, _playBlockSize); WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "nSamples(%d) != _playBlockSize(%d)", nSamples, _playBlockSize);
} }
@@ -3852,7 +3853,7 @@ DWORD AudioDeviceWindowsCore::DoCaptureThreadPollDMO()
// TODO(andrew): verify that this is always satisfied. It might // TODO(andrew): verify that this is always satisfied. It might
// be that ProcessOutput will try to return more than 10 ms if // be that ProcessOutput will try to return more than 10 ms if
// we fail to call it frequently enough. // we fail to call it frequently enough.
assert(kSamplesProduced == _recBlockSize); assert(kSamplesProduced == static_cast<int>(_recBlockSize));
assert(sizeof(BYTE) == sizeof(WebRtc_Word8)); assert(sizeof(BYTE) == sizeof(WebRtc_Word8));
_ptrAudioBuffer->SetRecordedBuffer( _ptrAudioBuffer->SetRecordedBuffer(
reinterpret_cast<WebRtc_Word8*>(data), reinterpret_cast<WebRtc_Word8*>(data),
@@ -4904,6 +4905,10 @@ WebRtc_Word32 AudioDeviceWindowsCore::_EnumerateEndpointDevicesAll(EDataFlow dat
HRESULT hr = S_OK; HRESULT hr = S_OK;
IMMDeviceCollection *pCollection = NULL; IMMDeviceCollection *pCollection = NULL;
IMMDevice *pEndpoint = NULL;
IPropertyStore *pProps = NULL;
IAudioEndpointVolume* pEndpointVolume = NULL;
LPWSTR pwszID = NULL;
// Generate a collection of audio endpoint devices in the system. // Generate a collection of audio endpoint devices in the system.
// Get states for *all* endpoint devices. // Get states for *all* endpoint devices.
@@ -4917,11 +4922,7 @@ WebRtc_Word32 AudioDeviceWindowsCore::_EnumerateEndpointDevicesAll(EDataFlow dat
// use the IMMDeviceCollection interface... // use the IMMDeviceCollection interface...
UINT count; UINT count = 0;
IMMDevice *pEndpoint = NULL;
IPropertyStore *pProps = NULL;
IAudioEndpointVolume* pEndpointVolume = NULL;
LPWSTR pwszID = NULL;
// Retrieve a count of the devices in the device collection. // Retrieve a count of the devices in the device collection.
hr = pCollection->GetCount(&count); hr = pCollection->GetCount(&count);

View File

@@ -194,8 +194,8 @@ WebRtc_Word32 DeviceInfoDS::GetDeviceInfo(
(_wcsnicmp(varName.bstrVal, (L"Google Camera Adapter"),21) (_wcsnicmp(varName.bstrVal, (L"Google Camera Adapter"),21)
!= 0)) != 0))
{ {
// Found a valid device // Found a valid device.
if (index == deviceNumber) // This is the device we are interested in. if (index == static_cast<int>(deviceNumber))
{ {
int convResult = 0; int convResult = 0;
if (deviceNameLength > 0) if (deviceNameLength > 0)