diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/AudioRecord.h | 16 | ||||
-rw-r--r-- | include/media/AudioTrack.h | 19 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 10 |
3 files changed, 23 insertions, 22 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index baab2e8..605680a 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -130,7 +130,7 @@ public: * sampleRate: Track sampling rate in Hz. * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * 16 bits per sample). - * channels: Channel mask: see audio_channels_t. + * channelMask: Channel mask: see audio_channels_t. * frameCount: Total size of track PCM buffer in frames. This defines the * latency of the track. * flags: A bitmask of acoustic values from enum record_flags. It enables @@ -151,7 +151,7 @@ public: AudioRecord(int inputSource, uint32_t sampleRate = 0, int format = 0, - uint32_t channels = AUDIO_CHANNEL_IN_MONO, + uint32_t channelMask = AUDIO_CHANNEL_IN_MONO, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, @@ -177,7 +177,7 @@ public: status_t set(int inputSource = 0, uint32_t sampleRate = 0, int format = 0, - uint32_t channels = AUDIO_CHANNEL_IN_MONO, + uint32_t channelMask = AUDIO_CHANNEL_IN_MONO, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, @@ -348,8 +348,8 @@ private: bool processAudioBuffer(const sp<ClientRecordThread>& thread); status_t openRecord_l(uint32_t sampleRate, - int format, - int channelCount, + uint32_t format, + uint32_t channelMask, int frameCount, uint32_t flags, audio_io_handle_t input); @@ -364,10 +364,10 @@ private: uint32_t mFrameCount; audio_track_cblk_t* mCblk; - uint8_t mFormat; + uint32_t mFormat; uint8_t mChannelCount; uint8_t mInputSource; - uint8_t mReserved; + uint8_t mReserved[2]; status_t mStatus; uint32_t mLatency; @@ -382,7 +382,7 @@ private: uint32_t mNewPosition; uint32_t mUpdatePeriod; uint32_t mFlags; - uint32_t mChannels; + uint32_t mChannelMask; audio_io_handle_t mInput; int mSessionId; }; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index de928da..df30e8c 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -69,8 +69,8 @@ public: MUTE = 0x00000001 }; uint32_t flags; - int channelCount; int format; + int channelCount; // will be removed in the future, do not use size_t frameCount; size_t size; union { @@ -129,7 +129,7 @@ public: * sampleRate: Track sampling rate in Hz. * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * 16 bits per sample). - * channels: Channel mask: see audio_channels_t. + * channelMask: Channel mask: see audio_channels_t. * frameCount: Total size of track PCM buffer in frames. This defines the * latency of the track. * flags: Reserved for future use. @@ -143,7 +143,7 @@ public: AudioTrack( int streamType, uint32_t sampleRate = 0, int format = 0, - int channels = 0, + int channelMask = 0, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, @@ -163,7 +163,7 @@ public: AudioTrack( int streamType, uint32_t sampleRate = 0, int format = 0, - int channels = 0, + int channelMask = 0, const sp<IMemory>& sharedBuffer = 0, uint32_t flags = 0, callback_t cbf = 0, @@ -187,7 +187,7 @@ public: status_t set(int streamType =-1, uint32_t sampleRate = 0, int format = 0, - int channels = 0, + int channelMask = 0, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, @@ -438,8 +438,8 @@ private: bool processAudioBuffer(const sp<AudioTrackThread>& thread); status_t createTrack_l(int streamType, uint32_t sampleRate, - int format, - int channelCount, + uint32_t format, + uint32_t channelMask, int frameCount, uint32_t flags, const sp<IMemory>& sharedBuffer, @@ -459,11 +459,12 @@ private: uint32_t mFrameCount; audio_track_cblk_t* mCblk; + uint32_t mFormat; uint8_t mStreamType; - uint8_t mFormat; uint8_t mChannelCount; uint8_t mMuted; - uint32_t mChannels; + uint8_t mReserved; + uint32_t mChannelMask; status_t mStatus; uint32_t mLatency; diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index d8fdc27..4037c46 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -48,8 +48,8 @@ public: pid_t pid, int streamType, uint32_t sampleRate, - int format, - int channelCount, + uint32_t format, + uint32_t channelMask, int frameCount, uint32_t flags, const sp<IMemory>& sharedBuffer, @@ -61,8 +61,8 @@ public: pid_t pid, int input, uint32_t sampleRate, - int format, - int channelCount, + uint32_t format, + uint32_t channelMask, int frameCount, uint32_t flags, int *sessionId, @@ -73,7 +73,7 @@ public: */ virtual uint32_t sampleRate(int output) const = 0; virtual int channelCount(int output) const = 0; - virtual int format(int output) const = 0; + virtual uint32_t format(int output) const = 0; virtual size_t frameCount(int output) const = 0; virtual uint32_t latency(int output) const = 0; |