summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-11-16 08:14:40 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-16 08:14:41 -0800
commit56938ef8dc82b49ddbc201a8855c91ba46d73bfb (patch)
tree891f97fea9f8d8501752e34db02c19f2284db91a /include
parente3722cb3364c3b5dab450067a13901e90291b46d (diff)
parent7da35f231725aa6e0b2ac8714a7d66471368df77 (diff)
downloadframeworks_av-56938ef8dc82b49ddbc201a8855c91ba46d73bfb.zip
frameworks_av-56938ef8dc82b49ddbc201a8855c91ba46d73bfb.tar.gz
frameworks_av-56938ef8dc82b49ddbc201a8855c91ba46d73bfb.tar.bz2
Merge "Use size_t for frame counts"
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h8
-rw-r--r--include/media/AudioSystem.h10
-rw-r--r--include/media/AudioTrack.h4
-rw-r--r--include/media/IAudioFlinger.h10
4 files changed, 16 insertions, 16 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 2672db1..cd7ff92 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -95,7 +95,7 @@ public:
* - BAD_VALUE: unsupported configuration
*/
- static status_t getMinFrameCount(int* frameCount,
+ static status_t getMinFrameCount(size_t* frameCount,
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask);
@@ -184,7 +184,7 @@ public:
audio_format_t format() const;
int channelCount() const;
- uint32_t frameCount() const;
+ size_t frameCount() const;
size_t frameSize() const { return mFrameSize; }
audio_source_t inputSource() const;
@@ -352,7 +352,7 @@ private:
status_t openRecord_l(uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
audio_io_handle_t input);
audio_io_handle_t getInput_l();
status_t restoreRecord_l(audio_track_cblk_t*& cblk);
@@ -375,7 +375,7 @@ private:
uint32_t mUpdatePeriod; // in ms
// constant after constructor or set()
- uint32_t mFrameCount;
+ size_t mFrameCount;
audio_format_t mFormat;
uint8_t mChannelCount;
size_t mFrameSize; // app-level frame size == AudioFlinger frame size
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 33078bb..126ef12 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -89,7 +89,7 @@ public:
static status_t getOutputSamplingRate(uint32_t* samplingRate,
audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
- static status_t getOutputFrameCount(int* frameCount,
+ static status_t getOutputFrameCount(size_t* frameCount,
audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
static status_t getOutputLatency(uint32_t* latency,
audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
@@ -100,7 +100,7 @@ public:
// audio_stream->get_buffer_size()/audio_stream_frame_size()
static status_t getFrameCount(audio_io_handle_t output,
audio_stream_type_t stream,
- int* frameCount);
+ size_t* frameCount);
// returns the audio output stream latency in ms. Corresponds to
// audio_stream_out->get_latency()
static status_t getLatency(audio_io_handle_t output,
@@ -123,11 +123,11 @@ public:
// - BAD_VALUE: invalid parameter
// NOTE: this feature is not supported on all hardware platforms and it is
// necessary to check returned status before using the returned values.
- static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames,
+ static status_t getRenderPosition(size_t *halFrames, size_t *dspFrames,
audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
// return the number of input frames lost by HAL implementation, or 0 if the handle is invalid
- static unsigned int getInputFramesLost(audio_io_handle_t ioHandle);
+ static size_t getInputFramesLost(audio_io_handle_t ioHandle);
static int newAudioSessionId();
static void acquireAudioSessionId(int audioSession);
@@ -238,7 +238,7 @@ public:
// helpers for android.media.AudioManager.getProperty(), see description there for meaning
static uint32_t getPrimaryOutputSamplingRate();
- static int32_t getPrimaryOutputFrameCount();
+ static size_t getPrimaryOutputFrameCount();
// ----------------------------------------------------------------------------
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 6fd1b9e..f1b26b5 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -110,7 +110,7 @@ public:
* - NO_INIT: audio server or audio hardware not initialized
*/
- static status_t getMinFrameCount(int* frameCount,
+ static status_t getMinFrameCount(size_t* frameCount,
audio_stream_type_t streamType = AUDIO_STREAM_DEFAULT,
uint32_t sampleRate = 0);
@@ -494,7 +494,7 @@ protected:
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
audio_output_flags_t flags,
const sp<IMemory>& sharedBuffer,
audio_io_handle_t output);
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 5fd5044..9727143 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -61,7 +61,7 @@ public:
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
track_flags_t *flags,
const sp<IMemory>& sharedBuffer,
audio_io_handle_t output,
@@ -75,7 +75,7 @@ public:
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
track_flags_t flags,
pid_t tid, // -1 means unused, otherwise must be valid non-0
int *sessionId,
@@ -157,10 +157,10 @@ public:
virtual status_t setVoiceVolume(float volume) = 0;
- virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames,
+ virtual status_t getRenderPosition(size_t *halFrames, size_t *dspFrames,
audio_io_handle_t output) const = 0;
- virtual unsigned int getInputFramesLost(audio_io_handle_t ioHandle) const = 0;
+ virtual size_t getInputFramesLost(audio_io_handle_t ioHandle) const = 0;
virtual int newAudioSessionId() = 0;
@@ -193,7 +193,7 @@ public:
// FIXME move these APIs to AudioPolicy to permit a more accurate implementation
// that looks on primary device for a stream with fast flag, primary flag, or first one.
virtual uint32_t getPrimaryOutputSamplingRate() = 0;
- virtual int32_t getPrimaryOutputFrameCount() = 0;
+ virtual size_t getPrimaryOutputFrameCount() = 0;
};