This CL will exclude the built-in ADM when building with chromium.
When building with chromium, we use dummy ADM for all the platforms. Review URL: http://webrtc-codereview.appspot.com/108001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@373 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8dd7466b52
commit
bf5d2ba8fb
@ -39,9 +39,11 @@
|
||||
# Exclude pulse audio on Chromium since its prerequisites don't
|
||||
# include pulse audio.
|
||||
'include_pulse_audio%': 0,
|
||||
# Exclude internal ADM since chrome uses its own IO handling.
|
||||
'include_internal_audio_device%': 0,
|
||||
}, {
|
||||
'include_pulse_audio%': 1,
|
||||
|
||||
'include_internal_audio_device%': 1,
|
||||
# The Chromium common.gypi we use treats all gyp files without
|
||||
# chromium_code==1 as third party code. This disables many of the
|
||||
# preferred warning settings.
|
||||
|
@ -49,87 +49,102 @@
|
||||
'dummy/audio_device_dummy.h',
|
||||
'dummy/audio_device_utility_dummy.cc',
|
||||
'dummy/audio_device_utility_dummy.h',
|
||||
'linux/alsasymboltable_linux.cc',
|
||||
'linux/alsasymboltable_linux.h',
|
||||
'linux/audio_device_alsa_linux.cc',
|
||||
'linux/audio_device_alsa_linux.h',
|
||||
'linux/audio_device_utility_linux.cc',
|
||||
'linux/audio_device_utility_linux.h',
|
||||
'linux/audio_mixer_manager_alsa_linux.cc',
|
||||
'linux/audio_mixer_manager_alsa_linux.h',
|
||||
'linux/latebindingsymboltable_linux.cc',
|
||||
'linux/latebindingsymboltable_linux.h',
|
||||
'mac/audio_device_mac.cc',
|
||||
'mac/audio_device_mac.h',
|
||||
'mac/audio_device_utility_mac.cc',
|
||||
'mac/audio_device_utility_mac.h',
|
||||
'mac/audio_mixer_manager_mac.cc',
|
||||
'mac/audio_mixer_manager_mac.h',
|
||||
'mac/portaudio/pa_memorybarrier.h',
|
||||
'mac/portaudio/pa_ringbuffer.c',
|
||||
'mac/portaudio/pa_ringbuffer.h',
|
||||
'win/audio_device_utility_win.cc',
|
||||
'win/audio_device_utility_win.h',
|
||||
'win/audio_device_core_win.cc',
|
||||
'win/audio_device_core_win.h',
|
||||
'win/audio_device_wave_win.cc',
|
||||
'win/audio_device_wave_win.h',
|
||||
'win/audio_mixer_manager_win.cc',
|
||||
'win/audio_mixer_manager_win.h',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="linux"', {
|
||||
'defines': [
|
||||
'LINUX_ALSA',
|
||||
],
|
||||
'include_dirs': [
|
||||
'linux',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-ldl',
|
||||
'-lasound',
|
||||
}], # OS==linux
|
||||
['OS=="mac"', {
|
||||
'include_dirs': [
|
||||
'mac',
|
||||
],
|
||||
},
|
||||
}], # OS==mac
|
||||
['OS=="win"', {
|
||||
'include_dirs': [
|
||||
'win',
|
||||
'../../../../../..',
|
||||
],
|
||||
}],
|
||||
['include_internal_audio_device==0', {
|
||||
'defines': [
|
||||
'WEBRTC_DUMMY_AUDIO_BUILD',
|
||||
],
|
||||
}],
|
||||
['include_internal_audio_device==1', {
|
||||
'sources': [
|
||||
'linux/alsasymboltable_linux.cc',
|
||||
'linux/alsasymboltable_linux.h',
|
||||
'linux/audio_device_alsa_linux.cc',
|
||||
'linux/audio_device_alsa_linux.h',
|
||||
'linux/audio_device_utility_linux.cc',
|
||||
'linux/audio_device_utility_linux.h',
|
||||
'linux/audio_mixer_manager_alsa_linux.cc',
|
||||
'linux/audio_mixer_manager_alsa_linux.h',
|
||||
'linux/latebindingsymboltable_linux.cc',
|
||||
'linux/latebindingsymboltable_linux.h',
|
||||
'mac/audio_device_mac.cc',
|
||||
'mac/audio_device_mac.h',
|
||||
'mac/audio_device_utility_mac.cc',
|
||||
'mac/audio_device_utility_mac.h',
|
||||
'mac/audio_mixer_manager_mac.cc',
|
||||
'mac/audio_mixer_manager_mac.h',
|
||||
'mac/portaudio/pa_memorybarrier.h',
|
||||
'mac/portaudio/pa_ringbuffer.c',
|
||||
'mac/portaudio/pa_ringbuffer.h',
|
||||
'win/audio_device_core_win.cc',
|
||||
'win/audio_device_core_win.h',
|
||||
'win/audio_device_wave_win.cc',
|
||||
'win/audio_device_wave_win.h',
|
||||
'win/audio_device_utility_win.cc',
|
||||
'win/audio_device_utility_win.h',
|
||||
'win/audio_mixer_manager_win.cc',
|
||||
'win/audio_mixer_manager_win.h',
|
||||
],
|
||||
'conditions': [
|
||||
['include_pulse_audio==1', {
|
||||
['OS=="linux"', {
|
||||
'defines': [
|
||||
'LINUX_PULSE',
|
||||
],
|
||||
'sources': [
|
||||
'linux/audio_device_pulse_linux.cc',
|
||||
'linux/audio_device_pulse_linux.h',
|
||||
'linux/audio_mixer_manager_pulse_linux.cc',
|
||||
'linux/audio_mixer_manager_pulse_linux.h',
|
||||
'linux/pulseaudiosymboltable_linux.cc',
|
||||
'linux/pulseaudiosymboltable_linux.h',
|
||||
'LINUX_ALSA',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lpulse',
|
||||
'-ldl',
|
||||
'-lasound',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['include_pulse_audio==1', {
|
||||
'defines': [
|
||||
'LINUX_PULSE',
|
||||
],
|
||||
'sources': [
|
||||
'linux/audio_device_pulse_linux.cc',
|
||||
'linux/audio_device_pulse_linux.h',
|
||||
'linux/audio_mixer_manager_pulse_linux.cc',
|
||||
'linux/audio_mixer_manager_pulse_linux.h',
|
||||
'linux/pulseaudiosymboltable_linux.cc',
|
||||
'linux/pulseaudiosymboltable_linux.h',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lpulse',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'include_dirs': [
|
||||
'mac',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
|
||||
],
|
||||
},
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'include_dirs': [
|
||||
'win',
|
||||
'../../../../../..',
|
||||
],
|
||||
}],
|
||||
] # conditions
|
||||
], # conditions
|
||||
}], # include_internal_audio_device==1
|
||||
], # conditions
|
||||
},
|
||||
],
|
||||
# Exclude the test targets when building with chromium.
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include "audio_device_impl.h"
|
||||
#include "audio_device_config.h"
|
||||
|
||||
#include "critical_section_wrapper.h"
|
||||
#include "trace.h"
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "audio_device_utility_win.h"
|
||||
@ -45,8 +45,8 @@
|
||||
#endif
|
||||
#include "audio_device_dummy.h"
|
||||
#include "audio_device_utility_dummy.h"
|
||||
|
||||
#include <cassert>
|
||||
#include "critical_section_wrapper.h"
|
||||
#include "trace.h"
|
||||
|
||||
#define CHECK_INITIALIZED() \
|
||||
{ \
|
||||
@ -232,6 +232,15 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
AudioDeviceGeneric* ptrAudioDevice(NULL);
|
||||
AudioDeviceUtility* ptrAudioDeviceUtility(NULL);
|
||||
|
||||
#if defined(WEBRTC_DUMMY_AUDIO_BUILD)
|
||||
ptrAudioDevice = new AudioDeviceDummy(Id());
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "Dummy Audio APIs will be utilized");
|
||||
|
||||
if (ptrAudioDevice != NULL)
|
||||
{
|
||||
ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id());
|
||||
}
|
||||
#else
|
||||
const AudioLayer audioLayer(PlatformAudioLayer());
|
||||
|
||||
// Create the *Windows* implementation of the Audio Device
|
||||
@ -418,6 +427,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id());
|
||||
}
|
||||
}
|
||||
#endif // if defined(WEBRTC_DUMMY_AUDIO_BUILD)
|
||||
|
||||
if (ptrAudioDevice == NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user