From 2020656fb677d5246725df0c0957690e12d24aef Mon Sep 17 00:00:00 2001 From: "henrika@google.com" Date: Wed, 15 Jun 2011 09:34:42 +0000 Subject: [PATCH] Removed invalid documents. git-svn-id: http://webrtc.googlecode.com/svn/trunk@84 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../documentation/audio_device_api.graphml | 300 ----- .../audio_device_class_diagram.graphml | 568 --------- .../documentation/current_data_flow.graphml | 294 ----- .../playout_buffer_logic.graphml | 1100 ----------------- 4 files changed, 2262 deletions(-) delete mode 100644 modules/audio_device/main/documentation/audio_device_api.graphml delete mode 100644 modules/audio_device/main/documentation/audio_device_class_diagram.graphml delete mode 100644 modules/audio_device/main/documentation/current_data_flow.graphml delete mode 100644 modules/audio_device/main/documentation/playout_buffer_logic.graphml diff --git a/modules/audio_device/main/documentation/audio_device_api.graphml b/modules/audio_device/main/documentation/audio_device_api.graphml deleted file mode 100644 index 40106c001..000000000 --- a/modules/audio_device/main/documentation/audio_device_api.graphml +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - AudioDeviceModule - - - // Factory methods (resource allocation/deallocation) - static AudioDeviceModule* Create( - const WebRtc_Word32 id, - const AudioLayer audioLayer = kPlatformDefaultAudio); - static void Destroy(AudioDeviceModule* module); - - // Retrieve the currently utilized audio layer - virtual WebRtc_Word32 ActiveAudioLayer(AudioLayer& audioLayer) const; - - // Error handling - virtual ErrorCode LastError() const; - virtual WebRtc_Word32 RegisterEventObserver( - AudioDeviceObserver* eventCallback); - - // Full-duplex transportation of PCM audio - virtual WebRtc_Word32 RegisterAudioCallback( - AudioTransport* audioCallback); - - // Main initializaton and termination - virtual WebRtc_Word32 Init(); - virtual WebRtc_Word32 Terminate(); - virtual bool Initialized() const; - - // Device enumeration - virtual WebRtc_Word16 PlayoutDevices(); - virtual WebRtc_Word16 RecordingDevices(); - virtual WebRtc_Word32 PlayoutDeviceName( - WebRtc_UWord16 index, - WebRtc_Word8 name[kAdmMaxDeviceNameSize], - WebRtc_Word8 guid[kAdmMaxGuidSize]); - virtual WebRtc_Word32 RecordingDeviceName( - WebRtc_UWord16 index, - WebRtc_Word8 name[kAdmMaxDeviceNameSize], - WebRtc_Word8 guid[kAdmMaxGuidSize]); - - // Device selection - virtual WebRtc_Word32 SetPlayoutDevice(WebRtc_UWord16 index); - virtual WebRtc_Word32 SetPlayoutDevice(WindowsDeviceType device); - virtual WebRtc_Word32 SetRecordingDevice(WebRtc_UWord16 index); - virtual WebRtc_Word32 SetRecordingDevice(WindowsDeviceType device); - - // Audio transport initialization - virtual WebRtc_Word32 PlayoutIsAvailable(bool& available); - virtual WebRtc_Word32 InitPlayout(); - virtual bool PlayoutIsInitialized() const; - virtual WebRtc_Word32 RecordingIsAvailable(bool& available); - virtual WebRtc_Word32 InitRecording(); - virtual bool RecordingIsInitialized() const; - - // Audio transport control - virtual WebRtc_Word32 StartPlayout(); - virtual WebRtc_Word32 StopPlayout(); - virtual bool Playing() const; - virtual WebRtc_Word32 StartRecording(); - virtual WebRtc_Word32 StopRecording(); - virtual bool Recording() const; - - // Microphone Automatic Gain Control (AGC) - virtual WebRtc_Word32 SetAGC(bool enable); - virtual bool AGC() const; - - // Volume control based on the Windows Wave API (Windows only) - virtual WebRtc_Word32 SetWaveOutVolume(WebRtc_UWord16 volumeLeft, - WebRtc_UWord16 volumeRight); - virtual WebRtc_Word32 WaveOutVolume(WebRtc_UWord16& volumeLeft, - WebRtc_UWord16& volumeRight) const; - - // Audio mixer initialization - virtual WebRtc_Word32 SpeakerIsAvailable(bool& available); - virtual WebRtc_Word32 InitSpeaker(); - virtual bool SpeakerIsInitialized() const; - virtual WebRtc_Word32 MicrophoneIsAvailable(bool& available); - virtual WebRtc_Word32 InitMicrophone(); - virtual bool MicrophoneIsInitialized() const; - - // Speaker volume controls - virtual WebRtc_Word32 SpeakerVolumeIsAvailable(bool& available); - virtual WebRtc_Word32 SetSpeakerVolume(WebRtc_UWord32 volume); - virtual WebRtc_Word32 SpeakerVolume(WebRtc_UWord32& volume) const; - virtual WebRtc_Word32 MaxSpeakerVolume(WebRtc_UWord32& maxVolume) const; - virtual WebRtc_Word32 MinSpeakerVolume(WebRtc_UWord32& minVolume) const; - virtual WebRtc_Word32 SpeakerVolumeStepSize( - WebRtc_UWord16& stepSize) const; - - // Microphone volume controls - virtual WebRtc_Word32 MicrophoneVolumeIsAvailable(bool& available); - virtual WebRtc_Word32 SetMicrophoneVolume(WebRtc_UWord32 volume); - virtual WebRtc_Word32 MicrophoneVolume(WebRtc_UWord32& volume) const; - virtual WebRtc_Word32 MaxMicrophoneVolume( - WebRtc_UWord32& maxVolume) const; - virtual WebRtc_Word32 MinMicrophoneVolume( - WebRtc_UWord32& minVolume) const; - virtual WebRtc_Word32 MicrophoneVolumeStepSize( - WebRtc_UWord16& stepSize) const; - - // Speaker mute control - virtual WebRtc_Word32 SpeakerMuteIsAvailable(bool& available); - virtual WebRtc_Word32 SetSpeakerMute(bool enable); - virtual WebRtc_Word32 SpeakerMute(bool& enabled) const; - - // Microphone mute control - virtual WebRtc_Word32 MicrophoneMuteIsAvailable(bool& available); - virtual WebRtc_Word32 SetMicrophoneMute(bool enable); - virtual WebRtc_Word32 MicrophoneMute(bool& enabled) const; - - // Microphone boost control - virtual WebRtc_Word32 MicrophoneBoostIsAvailable(bool& available); - virtual WebRtc_Word32 SetMicrophoneBoost(bool enable); - virtual WebRtc_Word32 MicrophoneBoost(bool& enabled) const; - - // Stereo support - virtual WebRtc_Word32 StereoPlayoutIsAvailable(bool& available) const; - virtual WebRtc_Word32 SetStereoPlayout(bool enable); - virtual WebRtc_Word32 StereoPlayout(bool& enabled) const; - virtual WebRtc_Word32 StereoRecordingIsAvailable(bool& available) const; - virtual WebRtc_Word32 SetStereoRecording(bool enable); - virtual WebRtc_Word32 StereoRecording(bool& enabled) const; - virtual WebRtc_Word32 SetRecordingChannel(const ChannelType channel); - virtual WebRtc_Word32 RecordingChannel(ChannelType& channel) const; - - // Delay information and control - virtual WebRtc_Word32 SetPlayoutBuffer(const BufferType type, - WebRtc_UWord16 sizeMS = 0); - virtual WebRtc_Word32 PlayoutBuffer(BufferType& type, - WebRtc_UWord16& sizeMS) const; - virtual WebRtc_Word32 PlayoutDelay(WebRtc_UWord16& delayMS) const; - virtual WebRtc_Word32 RecordingDelay(WebRtc_UWord16& delayMS) const; - - // CPU load - virtual WebRtc_Word32 CPULoad(WebRtc_UWord16& load) const; - - // Recording of raw PCM data - virtual WebRtc_Word32 StartRawOutputFileRecording( - const WebRtc_Word8 pcmFileNameUTF8[kAdmMaxFileNameSize]); - virtual WebRtc_Word32 StopRawOutputFileRecording(); - virtual WebRtc_Word32 StartRawInputFileRecording( - const WebRtc_Word8 pcmFileNameUTF8[kAdmMaxFileNameSize]); - virtual WebRtc_Word32 StopRawInputFileRecording(); - - // Native sample rate controls (samples/sec) - virtual WebRtc_Word32 SetRecordingSampleRate( - const WebRtc_UWord32 samplesPerSec); - virtual WebRtc_Word32 RecordingSampleRate( - WebRtc_UWord32& samplesPerSec) const; - virtual WebRtc_Word32 SetPlayoutSampleRate( - const WebRtc_UWord32 samplesPerSec); - virtual WebRtc_Word32 PlayoutSampleRate( - WebRtc_UWord32& samplesPerSec) const; - - // Mobile device specific functions - virtual WebRtc_Word32 ResetAudioDevice(); - virtual WebRtc_Word32 SetLoudspeakerStatus(bool enable); - virtual WebRtc_Word32 GetLoudspeakerStatus(bool& enabled) const; - - - - - - - - - - - - AudioDeviceObserver - - - virtual void OnErrorIsReported(const ErrorCode error) = 0; -virtual void OnWarningIsReported(const WarningCode warning) = 0; - - - - - - - - - - - Class AudioDeviceModule - - - - - - - - - - - Module - - - - - - - - - - - - - - - AudioTransport - - - virtual WebRtc_Word32 RecordedDataIsAvailable(const WebRtc_Word8* audioSamples, - const WebRtc_UWord32 nSamples, - const WebRtc_UWord8 nBytesPerSample, - const WebRtc_UWord8 nChannels, - const WebRtc_UWord32 sampleRate, - const WebRtc_UWord32 totalDelay, - const WebRtc_Word32 clockSkew, - const WebRtc_UWord32 currentMicLevel, - WebRtc_UWord32& newMicLevel) = 0; - -virtual WebRtc_Word32 NeedMorePlayData(const WebRtc_UWord32 nSamples, - const WebRtc_UWord8 nBytesPerSample, - const WebRtc_UWord8 nChannels, - const WebRtc_UWord32 sampleRate, - WebRtc_Word8* audioSamples, - WebRtc_UWord32& nSamplesOut) = 0; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/audio_device/main/documentation/audio_device_class_diagram.graphml b/modules/audio_device/main/documentation/audio_device_class_diagram.graphml deleted file mode 100644 index 3517191b8..000000000 --- a/modules/audio_device/main/documentation/audio_device_class_diagram.graphml +++ /dev/null @@ -1,568 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - AudioDeviceModule - - static AudioDeviceModule* Create(const WebRtc_Word32 id, const AudioLayer audioLayer = kPlatformDefaultAudio); - static void Destroy(AudioDeviceModule* module); - static WebRtc_Word32 GetVersion(WebRtc_Word8* version, WebRtc_UWord32& remainingBufferInBytes, WebRtc_UWord32& position); - virtual WebRtc_Word32 ChangeUniqueId(const WebRtc_Word32 id) = 0; - virtual ErrorCode LastError() const = 0; - virtual WebRtc_Word32 RegisterEventObserver(AudioDeviceObserver* eventCallback) = 0; -virtual WebRtc_Word32 Init() = 0; -virtual WebRtc_Word32 Terminate() = 0; -// etc. - - - - - - - - - - - AudioDeviceObserver - - - virtual void OnErrorIsReported() = 0; -virtual void OnWarningIsReported() = 0; - - - - - - - - - - - Module - - - - - - - - - - - - - - - ModuleAudioDeviceImpl - - AudioDeviceGeneric* _ptrAudioDevice -AudioDeviceUtility* _ptrAudioDeviceUtility -AudioDeviceObserver* _ptrCbAudioDeviceObserver -AudioDeviceBuffer _audioDeviceBuffer - - - - - - - - - - - - AudioDeviceGeneric - - - - - - - - - - - - - - AudioDeviceWindowsWave - - AudioDeviceBuffer* _ptrAudioBuffer - - - - - - - - - - - - AudioDeviceWindowsCore - - AudioDeviceBuffer* _ptrAudioBuffer - - - - - - - - - - - - AudioDeviceLinuxALSA - - AudioDeviceBuffer* _ptrAudioBuffer - - - - - - - - - - - - More platforms to be added - - - - - - - - - - User can specify the audio layer at construction. -It is possible to select Windows Wave audio even -if we build with CORE_AUDIO flag and run on e.g. -a Vista or Windows 7 machine. -The user can also select default audio. - - - - - - - - - - audio_device_defines.h - - - - - - - - - - AudioDeviceUtility - - - - - - - - - - - - - - AudioDeviceUtilityWindows - - - - - - - - - - - - - - AudioDeviceUtilityLinux - - - - - - - - - - - - - - AudioDeviceUtilityMac - - - - - - - - - - - - - - AudioTransport - - - virtual WebRtc_Word32 RecordedDataIsAvailable() = 0; -virtual WebRtc_Word32 NeedMorePlayData() = 0; - - - - - - - - - - - AudioDeviceBuffer - - AudioTransport* _ptrCbAudioTransport - - - - - - - - - - - - Platform -independent -implementation - - - - - - - - - - - All audio/data transport goes "through" this platform-generic -class. The AudioDevice implementations copies recorded data -to this buffer and then signals that a AudioTransport callback -shall be performed. Also - in the other direction - the AudioDevices -informs this class when they needs more data to be played out, a -callback is performed and data stored in the AudioDeviceBuffer. -The AudioDevice implementations can then copy the stored data -and play it out. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/audio_device/main/documentation/current_data_flow.graphml b/modules/audio_device/main/documentation/current_data_flow.graphml deleted file mode 100644 index a6facc29b..000000000 --- a/modules/audio_device/main/documentation/current_data_flow.graphml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - SndCardStream - - - - - - - - - - - - VoiceEngine - - - - - - - - - - - - Rendering - - - - - - - - - - - - Capturing - - - - - - - - - - - - NeedMorePlayData() - [in] speech - [in] samples - [out] fs - [out] stereo - - - - - - - - - - - - - RecordedDataIsAvailable() - [out] speech - [out] delay - [out] fs - [out] skew - [in] newMicGain - - - - - - - - - - - - SndCardStreamObserver - - - - - - - - - - - - SndCard expects the mixer -output to be at the given -sample rate and stereo mode. -Conversion takes place in the -mixer. - - - - - - - - - - - SndCard always generates -10ms buffers at the specified -sample rate. Conversion must -take place before encoding. - - - - - - - - - - - The data flow is driven by the sound card (thread(s)) using -callback functions. An additional API is required if an external -source shall act as driver. - - - - - - - - - - - Current client audio implementation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - newMicGain - - - - - - - - - - - - - - - - - - - - - - - - - - - fs -stereo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/audio_device/main/documentation/playout_buffer_logic.graphml b/modules/audio_device/main/documentation/playout_buffer_logic.graphml deleted file mode 100644 index 6fd281cf8..000000000 --- a/modules/audio_device/main/documentation/playout_buffer_logic.graphml +++ /dev/null @@ -1,1100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Get remaining time -in sound-card -(RemTime) [ms] - - - - - - - - - - - RemTime < -(BufDelay + 9) - - - - - - - - - - - dT=5 ms - - - - - - - - - - - Initial values: - BufDelay = 80 [ms] - waitCount = 1700 - minPlayBufDelay = 25 - intro = 1 - - - - - - - - - - - RemTime > -(BufDelay + 9) - - - - - - - - - - - dT=2ms -remZeroCount=0 - - - - - - - - - - - waitCount > 2000 - - - - - - - - - - - waitCount++ - - - - - - - - - - - PlayProc() is called on -average each 10 ms. -dT_avg = 10 [ms] - - - - - - - - - - - _intro = 0 -BufDelay-- -waitCounter = 1990 - - - - - - - - - - - RemTime == 0 - - - - - - - - - - - RemTime < -minPlayBufDelay - - - - - - - - - - - RemTime < -(BufDelay - 9) - - - - - - - - - - - waitCount > 30 - - - - - - - - - - - remZeroCount++ - - - - - - - - - - - remZeroCount==2 - - - - - - - - - - - remZeroCount==3 - - - - - - - - - - - BufDelay += 15 -minBufDelay += 20 -waitCount = 50 - - - - - - - - - - - remZeroCount = 0 -BufDelay += 30 -minBufDelay += 25 -waitCounter = 0 - - - - - - - - - - - minBufDelay += 10 -BufDelay += 15 -waitCounter = 50 - - - - - - - - - - - waitCount > 30 - - - - - - - - - - - BufDelay+=10 - - - - - - - - - - - intro==0 - - - - - - - - - - - waitCount=0 - - - - - - - - - - - remZeroCount=0 - - - - - - - - - - - dT=10ms -remZeroCount=0 - - - - - - - - - - - Write data - - - - - - - - - - - minBufDelay > -MAX_minDelay - - - - - - - - - - - minBufDelay = MAX_minDelay - - - - - - - - - - - return - - - - - - - - - - - dT - - - - - - - - - - - BufDelay - - - - - - - - - - - BufDelay > 150 - - - - - - - - - - - BufDelay = 150 - - - - - - - - - - - BufDelay < minBufDelay - - - - - - - - - - - BufDelay = minBufDelay - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - true - - - - - - - - - - - - - - true - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - true - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -