summaryrefslogtreecommitdiffstats
path: root/media/jni/soundpool
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-04 09:36:37 -0800
committerGlenn Kasten <gkasten@google.com>2012-01-05 13:34:54 -0800
commit1c5a89d4af193e3ce9be9992ffee0ab0a4d8da5a (patch)
tree37cbdadbb8acf18fb022b3729c37c370ccbe853f /media/jni/soundpool
parenta8719ad9d53d3fe51e8031b2471e9558b8ef727f (diff)
downloadframeworks_base-1c5a89d4af193e3ce9be9992ffee0ab0a4d8da5a.zip
frameworks_base-1c5a89d4af193e3ce9be9992ffee0ab0a4d8da5a.tar.gz
frameworks_base-1c5a89d4af193e3ce9be9992ffee0ab0a4d8da5a.tar.bz2
Use audio_format_t consistently
Was int, uint32_t, uint16_t, and uint8_t with 2-bit bitfield. Also replace 0 by AUDIO_FORMAT_DEFAULT and replace 1 by AUDIO_FORMAT_PCM_16_BIT. Change-Id: Ia8804f53f1725669e368857d5bb2044917e17975
Diffstat (limited to 'media/jni/soundpool')
-rw-r--r--media/jni/soundpool/SoundPool.cpp2
-rw-r--r--media/jni/soundpool/SoundPool.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index 40db37f..56dcf17 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -496,7 +496,7 @@ status_t Sample::doLoad()
{
uint32_t sampleRate;
int numChannels;
- int format;
+ audio_format_t format;
sp<IMemory> p;
ALOGV("Start decode");
if (mUrl) {
diff --git a/media/jni/soundpool/SoundPool.h b/media/jni/soundpool/SoundPool.h
index 6010aac..1b91b3b 100644
--- a/media/jni/soundpool/SoundPool.h
+++ b/media/jni/soundpool/SoundPool.h
@@ -56,7 +56,7 @@ public:
int sampleID() { return mSampleID; }
int numChannels() { return mNumChannels; }
int sampleRate() { return mSampleRate; }
- int format() { return mFormat; }
+ audio_format_t format() { return mFormat; }
size_t size() { return mSize; }
int state() { return mState; }
uint8_t* data() { return static_cast<uint8_t*>(mData->pointer()); }
@@ -65,7 +65,7 @@ public:
sp<IMemory> getIMemory() { return mData; }
// hack
- void init(int numChannels, int sampleRate, int format, size_t size, sp<IMemory> data ) {
+ void init(int numChannels, int sampleRate, audio_format_t format, size_t size, sp<IMemory> data ) {
mNumChannels = numChannels; mSampleRate = sampleRate; mFormat = format; mSize = size; mData = data; }
private:
@@ -77,7 +77,7 @@ private:
uint16_t mSampleRate;
uint8_t mState : 3;
uint8_t mNumChannels : 2;
- uint8_t mFormat : 2;
+ audio_format_t mFormat;
int mFd;
int64_t mOffset;
int64_t mLength;