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:
@ -39,9 +39,11 @@
|
|||||||
# Exclude pulse audio on Chromium since its prerequisites don't
|
# Exclude pulse audio on Chromium since its prerequisites don't
|
||||||
# include pulse audio.
|
# include pulse audio.
|
||||||
'include_pulse_audio%': 0,
|
'include_pulse_audio%': 0,
|
||||||
|
# Exclude internal ADM since chrome uses its own IO handling.
|
||||||
|
'include_internal_audio_device%': 0,
|
||||||
}, {
|
}, {
|
||||||
'include_pulse_audio%': 1,
|
'include_pulse_audio%': 1,
|
||||||
|
'include_internal_audio_device%': 1,
|
||||||
# The Chromium common.gypi we use treats all gyp files without
|
# The Chromium common.gypi we use treats all gyp files without
|
||||||
# chromium_code==1 as third party code. This disables many of the
|
# chromium_code==1 as third party code. This disables many of the
|
||||||
# preferred warning settings.
|
# preferred warning settings.
|
||||||
|
@ -49,87 +49,102 @@
|
|||||||
'dummy/audio_device_dummy.h',
|
'dummy/audio_device_dummy.h',
|
||||||
'dummy/audio_device_utility_dummy.cc',
|
'dummy/audio_device_utility_dummy.cc',
|
||||||
'dummy/audio_device_utility_dummy.h',
|
'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': [
|
'conditions': [
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'defines': [
|
|
||||||
'LINUX_ALSA',
|
|
||||||
],
|
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'linux',
|
'linux',
|
||||||
],
|
],
|
||||||
'link_settings': {
|
}], # OS==linux
|
||||||
'libraries': [
|
['OS=="mac"', {
|
||||||
'-ldl',
|
'include_dirs': [
|
||||||
'-lasound',
|
'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': [
|
'conditions': [
|
||||||
['include_pulse_audio==1', {
|
['OS=="linux"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'LINUX_PULSE',
|
'LINUX_ALSA',
|
||||||
],
|
|
||||||
'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': {
|
'link_settings': {
|
||||||
'libraries': [
|
'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',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
],
|
], # conditions
|
||||||
}],
|
}], # include_internal_audio_device==1
|
||||||
['OS=="mac"', {
|
], # conditions
|
||||||
'include_dirs': [
|
|
||||||
'mac',
|
|
||||||
],
|
|
||||||
'link_settings': {
|
|
||||||
'libraries': [
|
|
||||||
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
|
|
||||||
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
['OS=="win"', {
|
|
||||||
'include_dirs': [
|
|
||||||
'win',
|
|
||||||
'../../../../../..',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
] # conditions
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
# Exclude the test targets when building with chromium.
|
# Exclude the test targets when building with chromium.
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include "audio_device_impl.h"
|
#include "audio_device_impl.h"
|
||||||
#include "audio_device_config.h"
|
#include "audio_device_config.h"
|
||||||
|
|
||||||
#include "critical_section_wrapper.h"
|
#include <cassert>
|
||||||
#include "trace.h"
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "audio_device_utility_win.h"
|
#include "audio_device_utility_win.h"
|
||||||
@ -45,8 +45,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "audio_device_dummy.h"
|
#include "audio_device_dummy.h"
|
||||||
#include "audio_device_utility_dummy.h"
|
#include "audio_device_utility_dummy.h"
|
||||||
|
#include "critical_section_wrapper.h"
|
||||||
#include <cassert>
|
#include "trace.h"
|
||||||
|
|
||||||
#define CHECK_INITIALIZED() \
|
#define CHECK_INITIALIZED() \
|
||||||
{ \
|
{ \
|
||||||
@ -232,6 +232,15 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
|||||||
AudioDeviceGeneric* ptrAudioDevice(NULL);
|
AudioDeviceGeneric* ptrAudioDevice(NULL);
|
||||||
AudioDeviceUtility* ptrAudioDeviceUtility(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());
|
const AudioLayer audioLayer(PlatformAudioLayer());
|
||||||
|
|
||||||
// Create the *Windows* implementation of the Audio Device
|
// Create the *Windows* implementation of the Audio Device
|
||||||
@ -418,6 +427,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
|||||||
ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id());
|
ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // if defined(WEBRTC_DUMMY_AUDIO_BUILD)
|
||||||
|
|
||||||
if (ptrAudioDevice == NULL)
|
if (ptrAudioDevice == NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user