summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-26 10:11:44 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-26 10:11:44 -0700
commit95634c8b6ad5419e310a5196bcc37f5988ed82da (patch)
treeea712e322c480a83965f8f51946eda3263bdd080 /include
parent0058db5fae0fecf66ee47aa1c35ddd6e11b6c66f (diff)
parentf5879c1448cc6aebc51b26d3ec2399d66144f8f4 (diff)
downloadframeworks_av-95634c8b6ad5419e310a5196bcc37f5988ed82da.zip
frameworks_av-95634c8b6ad5419e310a5196bcc37f5988ed82da.tar.gz
frameworks_av-95634c8b6ad5419e310a5196bcc37f5988ed82da.tar.bz2
am de8268d6: Merge change 2331 into donut
Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c' * commit 'de8268d6d1cd168510c490b17e93154d2eab767c': Fix issue 1846343 - part 1
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h19
-rw-r--r--include/media/IAudioFlinger.h2
-rw-r--r--include/media/mediarecorder.h4
3 files changed, 18 insertions, 7 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index e962db6..106807e 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -39,10 +39,15 @@ class AudioRecord
{
public:
- enum stream_type {
+ // input sources values must always be defined in the range
+ // [AudioRecord::DEFAULT_INPUT, AudioRecord::NUM_INPUT_SOURCES[
+ enum input_source {
DEFAULT_INPUT =-1,
MIC_INPUT = 0,
- NUM_STREAM_TYPES
+ VOICE_UPLINK_INPUT = 1,
+ VOICE_DOWNLINK_INPUT = 2,
+ VOICE_CALL_INPUT = 3,
+ NUM_INPUT_SOURCES
};
static const int DEFAULT_SAMPLE_RATE = 8000;
@@ -118,7 +123,7 @@ public:
*
* Parameters:
*
- * streamType: Select the audio input to record to (e.g. AudioRecord::MIC_INPUT).
+ * inputSource: Select the audio input to record to (e.g. AudioRecord::MIC_INPUT).
* sampleRate: Track sampling rate in Hz.
* format: PCM sample format (e.g AudioSystem::PCM_16_BIT for signed
* 16 bits per sample).
@@ -140,7 +145,7 @@ public:
RECORD_IIR_ENABLE = AudioSystem::TX_IIR_ENABLE
};
- AudioRecord(int streamType,
+ AudioRecord(int inputSource,
uint32_t sampleRate = 0,
int format = 0,
int channelCount = 0,
@@ -165,7 +170,7 @@ public:
* - NO_INIT: audio server or audio hardware not initialized
* - PERMISSION_DENIED: recording is not allowed for the requesting process
* */
- status_t set(int streamType = 0,
+ status_t set(int inputSource = 0,
uint32_t sampleRate = 0,
int format = 0,
int channelCount = 0,
@@ -197,6 +202,7 @@ public:
int channelCount() const;
uint32_t frameCount() const;
int frameSize() const;
+ int inputSource() const;
/* After it's created the track is not active. Call start() to
@@ -323,7 +329,8 @@ private:
audio_track_cblk_t* mCblk;
uint8_t mFormat;
uint8_t mChannelCount;
- uint8_t mReserved[2];
+ uint8_t mInputSource;
+ uint8_t mReserved;
status_t mStatus;
uint32_t mLatency;
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 031335e..bac3d29 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -54,7 +54,7 @@ public:
virtual sp<IAudioRecord> openRecord(
pid_t pid,
- int streamType,
+ int inputSource,
uint32_t sampleRate,
int format,
int channelCount,
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h
index b9ea0c6..aebe191 100644
--- a/include/media/mediarecorder.h
+++ b/include/media/mediarecorder.h
@@ -35,6 +35,10 @@ typedef void (*media_completion_f)(status_t status, void *cookie);
enum audio_source {
AUDIO_SOURCE_DEFAULT = 0,
AUDIO_SOURCE_MIC = 1,
+ AUDIO_SOURCE_VOICE_UPLINK = 2,
+ AUDIO_SOURCE_VOICE_DOWNLINK = 3,
+ AUDIO_SOURCE_VOICE_CALL = 4,
+ AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_CALL
};
enum video_source {