clang-format audio_device/mac.
NOTRY=true Review URL: https://codereview.webrtc.org/1570063003 Cr-Commit-Position: refs/heads/master@{#11212}
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -27,8 +27,7 @@ namespace rtc {
|
||||
class PlatformThread;
|
||||
} // namespace rtc
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
namespace webrtc {
|
||||
class EventWrapper;
|
||||
|
||||
const uint32_t N_REC_SAMPLES_PER_SEC = 48000;
|
||||
@ -58,15 +57,14 @@ const uint32_t PLAY_BUF_SIZE_IN_SAMPLES =
|
||||
|
||||
const int kGetMicVolumeIntervalMs = 1000;
|
||||
|
||||
class AudioDeviceMac: public AudioDeviceGeneric
|
||||
{
|
||||
class AudioDeviceMac : public AudioDeviceGeneric {
|
||||
public:
|
||||
AudioDeviceMac(const int32_t id);
|
||||
~AudioDeviceMac();
|
||||
|
||||
// Retrieve the currently utilized audio layer
|
||||
virtual int32_t
|
||||
ActiveAudioLayer(AudioDeviceModule::AudioLayer& audioLayer) const;
|
||||
virtual int32_t ActiveAudioLayer(
|
||||
AudioDeviceModule::AudioLayer& audioLayer) const;
|
||||
|
||||
// Main initializaton and termination
|
||||
virtual int32_t Init();
|
||||
@ -76,19 +74,16 @@ public:
|
||||
// Device enumeration
|
||||
virtual int16_t PlayoutDevices();
|
||||
virtual int16_t RecordingDevices();
|
||||
virtual int32_t PlayoutDeviceName(
|
||||
uint16_t index,
|
||||
virtual int32_t PlayoutDeviceName(uint16_t index,
|
||||
char name[kAdmMaxDeviceNameSize],
|
||||
char guid[kAdmMaxGuidSize]);
|
||||
virtual int32_t RecordingDeviceName(
|
||||
uint16_t index,
|
||||
virtual int32_t RecordingDeviceName(uint16_t index,
|
||||
char name[kAdmMaxDeviceNameSize],
|
||||
char guid[kAdmMaxGuidSize]);
|
||||
|
||||
// Device selection
|
||||
virtual int32_t SetPlayoutDevice(uint16_t index);
|
||||
virtual int32_t SetPlayoutDevice(
|
||||
AudioDeviceModule::WindowsDeviceType device);
|
||||
virtual int32_t SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device);
|
||||
virtual int32_t SetRecordingDevice(uint16_t index);
|
||||
virtual int32_t SetRecordingDevice(
|
||||
AudioDeviceModule::WindowsDeviceType device);
|
||||
@ -138,8 +133,7 @@ public:
|
||||
virtual int32_t MicrophoneVolume(uint32_t& volume) const;
|
||||
virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
|
||||
virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
|
||||
virtual int32_t
|
||||
MicrophoneVolumeStepSize(uint16_t& stepSize) const;
|
||||
virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
|
||||
|
||||
// Microphone mute control
|
||||
virtual int32_t MicrophoneMuteIsAvailable(bool& available);
|
||||
@ -165,8 +159,7 @@ public:
|
||||
virtual int32_t StereoRecording(bool& enabled) const;
|
||||
|
||||
// Delay information and control
|
||||
virtual int32_t
|
||||
SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||
virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||
uint16_t sizeMS);
|
||||
virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
||||
uint16_t& sizeMS) const;
|
||||
@ -196,7 +189,8 @@ private:
|
||||
|
||||
static void logCAMsg(const TraceLevel level,
|
||||
const TraceModule module,
|
||||
const int32_t id, const char *msg,
|
||||
const int32_t id,
|
||||
const char* msg,
|
||||
const char* err);
|
||||
|
||||
int32_t GetNumberDevices(const AudioObjectPropertyScope scope,
|
||||
@ -204,36 +198,36 @@ private:
|
||||
const uint32_t deviceListLength);
|
||||
|
||||
int32_t GetDeviceName(const AudioObjectPropertyScope scope,
|
||||
const uint16_t index, char* name);
|
||||
const uint16_t index,
|
||||
char* name);
|
||||
|
||||
int32_t InitDevice(uint16_t userDeviceIndex,
|
||||
AudioDeviceID& deviceId, bool isInput);
|
||||
AudioDeviceID& deviceId,
|
||||
bool isInput);
|
||||
|
||||
// Always work with our preferred playout format inside VoE.
|
||||
// Then convert the output to the OS setting using an AudioConverter.
|
||||
OSStatus SetDesiredPlayoutFormat();
|
||||
|
||||
static OSStatus
|
||||
objectListenerProc(AudioObjectID objectId, UInt32 numberAddresses,
|
||||
static OSStatus objectListenerProc(
|
||||
AudioObjectID objectId,
|
||||
UInt32 numberAddresses,
|
||||
const AudioObjectPropertyAddress addresses[],
|
||||
void* clientData);
|
||||
|
||||
OSStatus
|
||||
implObjectListenerProc(AudioObjectID objectId, UInt32 numberAddresses,
|
||||
OSStatus implObjectListenerProc(AudioObjectID objectId,
|
||||
UInt32 numberAddresses,
|
||||
const AudioObjectPropertyAddress addresses[]);
|
||||
|
||||
int32_t HandleDeviceChange();
|
||||
|
||||
int32_t
|
||||
HandleStreamFormatChange(AudioObjectID objectId,
|
||||
int32_t HandleStreamFormatChange(AudioObjectID objectId,
|
||||
AudioObjectPropertyAddress propertyAddress);
|
||||
|
||||
int32_t
|
||||
HandleDataSourceChange(AudioObjectID objectId,
|
||||
int32_t HandleDataSourceChange(AudioObjectID objectId,
|
||||
AudioObjectPropertyAddress propertyAddress);
|
||||
|
||||
int32_t
|
||||
HandleProcessorOverload(AudioObjectPropertyAddress propertyAddress);
|
||||
int32_t HandleProcessorOverload(AudioObjectPropertyAddress propertyAddress);
|
||||
|
||||
static OSStatus deviceIOProc(AudioDeviceID device,
|
||||
const AudioTimeStamp* now,
|
||||
@ -243,9 +237,10 @@ private:
|
||||
const AudioTimeStamp* outputTime,
|
||||
void* clientData);
|
||||
|
||||
static OSStatus
|
||||
outConverterProc(AudioConverterRef audioConverter,
|
||||
UInt32 *numberDataPackets, AudioBufferList *data,
|
||||
static OSStatus outConverterProc(
|
||||
AudioConverterRef audioConverter,
|
||||
UInt32* numberDataPackets,
|
||||
AudioBufferList* data,
|
||||
AudioStreamPacketDescription** dataPacketDescription,
|
||||
void* userData);
|
||||
|
||||
@ -257,9 +252,10 @@ private:
|
||||
const AudioTimeStamp* outputTime,
|
||||
void* clientData);
|
||||
|
||||
static OSStatus
|
||||
inConverterProc(AudioConverterRef audioConverter,
|
||||
UInt32 *numberDataPackets, AudioBufferList *data,
|
||||
static OSStatus inConverterProc(
|
||||
AudioConverterRef audioConverter,
|
||||
UInt32* numberDataPackets,
|
||||
AudioBufferList* data,
|
||||
AudioStreamPacketDescription** dataPacketDescription,
|
||||
void* inUserData);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,8 +19,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class AudioMixerManagerMac
|
||||
{
|
||||
class AudioMixerManagerMac {
|
||||
public:
|
||||
int32_t OpenSpeaker(AudioDeviceID deviceID);
|
||||
int32_t OpenMicrophone(AudioDeviceID deviceID);
|
||||
@ -60,7 +59,8 @@ public:
|
||||
private:
|
||||
static void logCAMsg(const TraceLevel level,
|
||||
const TraceModule module,
|
||||
const int32_t id, const char *msg,
|
||||
const int32_t id,
|
||||
const char* msg,
|
||||
const char* err);
|
||||
|
||||
private:
|
||||
@ -72,7 +72,6 @@ private:
|
||||
|
||||
uint16_t _noInputChannels;
|
||||
uint16_t _noOutputChannels;
|
||||
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user