Public Member Functions
android_audio_legacy::AudioStreamIn Class Referenceabstract

AudioStreamIn is the abstraction interface for the audio input hardware. More...

Public Member Functions

virtual status_t addAudioEffect (effect_handle_t effect)=0
 
virtual size_t bufferSize () const =0
 return the input buffer size allowed by audio driver More...
 
virtual uint32_t channels () const =0
 return input channel mask More...
 
virtual status_t dump (int fd, const Vector< String16 > &args)=0
 dump the state of the audio input device More...
 
virtual int format () const =0
 return audio format in 8bit or 16bit PCM format - eg. More...
 
uint32_t frameSize () const
 return the frame size (number of bytes per sample). More...
 
virtual unsigned int getInputFramesLost () const =0
 
virtual String8 getParameters (const String8 &keys)=0
 
virtual ssize_t read (void *buffer, ssize_t bytes)=0
 read audio buffer in from audio driver More...
 
virtual status_t removeAudioEffect (effect_handle_t effect)=0
 
virtual uint32_t sampleRate () const =0
 return audio sampling rate in hz - eg. More...
 
virtual status_t setGain (float gain)=0
 set the input gain for the audio driver. More...
 
virtual status_t setParameters (const String8 &keyValuePairs)=0
 
virtual status_t standby ()=0
 Put the audio hardware input into standby mode. More...
 
virtual ~AudioStreamIn ()=0
 

Detailed Description

AudioStreamIn is the abstraction interface for the audio input hardware.

It defines the various properties of the audio hardware input driver.

Definition at line 119 of file AudioHardwareInterface.h.

Constructor & Destructor Documentation

virtual android_audio_legacy::AudioStreamIn::~AudioStreamIn ( )
pure virtual

Member Function Documentation

virtual status_t android_audio_legacy::AudioStreamIn::addAudioEffect ( effect_handle_t  effect)
pure virtual
virtual size_t android_audio_legacy::AudioStreamIn::bufferSize ( ) const
pure virtual

return the input buffer size allowed by audio driver

virtual uint32_t android_audio_legacy::AudioStreamIn::channels ( ) const
pure virtual

return input channel mask

virtual status_t android_audio_legacy::AudioStreamIn::dump ( int  fd,
const Vector< String16 > &  args 
)
pure virtual

dump the state of the audio input device

virtual int android_audio_legacy::AudioStreamIn::format ( ) const
pure virtual

return audio format in 8bit or 16bit PCM format - eg.

AudioSystem:PCM_16_BIT

uint32_t android_audio_legacy::AudioStreamIn::frameSize ( ) const
inline

return the frame size (number of bytes per sample).

Definition at line 141 of file AudioHardwareInterface.h.

References channels(), and format().

virtual unsigned int android_audio_legacy::AudioStreamIn::getInputFramesLost ( ) const
pure virtual
virtual String8 android_audio_legacy::AudioStreamIn::getParameters ( const String8 &  keys)
pure virtual
virtual ssize_t android_audio_legacy::AudioStreamIn::read ( void *  buffer,
ssize_t  bytes 
)
pure virtual

read audio buffer in from audio driver

virtual status_t android_audio_legacy::AudioStreamIn::removeAudioEffect ( effect_handle_t  effect)
pure virtual
virtual uint32_t android_audio_legacy::AudioStreamIn::sampleRate ( ) const
pure virtual

return audio sampling rate in hz - eg.

44100

virtual status_t android_audio_legacy::AudioStreamIn::setGain ( float  gain)
pure virtual

set the input gain for the audio driver.

This method is for for future use

virtual status_t android_audio_legacy::AudioStreamIn::setParameters ( const String8 &  keyValuePairs)
pure virtual
virtual status_t android_audio_legacy::AudioStreamIn::standby ( )
pure virtual

Put the audio hardware input into standby mode.

Returns status based on include/utils/Errors.h