Use audio_source_t consistently

Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
 - fix comments in MediaRecorder.java
 - AudioPolicyService server side was not checking source parameter at
   all, so if the client wrapper was bypassed, invalid values could be
   passed into audio HAL
 - JNI android_media_AudioRecord_setup was checking source for positive
   values, but not negative values. This test is redundant, since already
   checked at Java and now checked by AudioPolicyService also, but might
   as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
This commit is contained in:
Glenn Kasten
2012-01-23 13:58:49 -08:00
parent 0f73d75da0
commit 0f0fbd9441
12 changed files with 30 additions and 24 deletions

View File

@ -163,7 +163,7 @@ public:
audio_stream_type_t stream,
int session = 0);
static void releaseOutput(audio_io_handle_t output);
static audio_io_handle_t getInput(int inputSource,
static audio_io_handle_t getInput(audio_source_t inputSource,
uint32_t samplingRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = AUDIO_CHANNEL_IN_MONO,