summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger/AudioHardwareGeneric.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
commitf013e1afd1e68af5e3b868c26a653bbfb39538f8 (patch)
tree7ad6c8fd9c7b55f4b4017171dec1cb760bbd26bf /libs/audioflinger/AudioHardwareGeneric.h
parente70cfafe580c6f2994c4827cd8a534aabf3eb05c (diff)
downloadframeworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.zip
frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.gz
frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'libs/audioflinger/AudioHardwareGeneric.h')
-rw-r--r--libs/audioflinger/AudioHardwareGeneric.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/libs/audioflinger/AudioHardwareGeneric.h b/libs/audioflinger/AudioHardwareGeneric.h
index 10cc45d..a2342cd 100644
--- a/libs/audioflinger/AudioHardwareGeneric.h
+++ b/libs/audioflinger/AudioHardwareGeneric.h
@@ -2,16 +2,16 @@
**
** Copyright 2007, The Android Open Source Project
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
**
-** http://www.apache.org/licenses/LICENSE-2.0
+** http://www.apache.org/licenses/LICENSE-2.0
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
** limitations under the License.
*/
@@ -23,7 +23,7 @@
#include <utils/threads.h>
-#include <hardware/AudioHardwareInterface.h>
+#include <hardware/AudioHardwareBase.h>
namespace android {
@@ -47,6 +47,7 @@ public:
virtual size_t bufferSize() const { return 4096; }
virtual int channelCount() const { return 2; }
virtual int format() const { return AudioSystem::PCM_16_BIT; }
+ virtual uint32_t latency() const { return 0; }
virtual status_t setVolume(float volume) { return INVALID_OPERATION; }
virtual ssize_t write(const void* buffer, size_t bytes);
virtual status_t dump(int fd, const Vector<String16>& args);
@@ -76,6 +77,7 @@ public:
virtual status_t setGain(float gain) { return INVALID_OPERATION; }
virtual ssize_t read(void* buffer, ssize_t bytes);
virtual status_t dump(int fd, const Vector<String16>& args);
+ virtual status_t standby() { return NO_ERROR; }
private:
AudioHardwareGeneric *mAudioHardware;
@@ -84,7 +86,7 @@ private:
};
-class AudioHardwareGeneric : public AudioHardwareInterface
+class AudioHardwareGeneric : public AudioHardwareBase
{
public:
AudioHardwareGeneric();
@@ -105,12 +107,14 @@ public:
virtual AudioStreamOut* openOutputStream(
int format=0,
int channelCount=0,
- uint32_t sampleRate=0);
+ uint32_t sampleRate=0,
+ status_t *status=0);
virtual AudioStreamIn* openInputStream(
int format,
int channelCount,
- uint32_t sampleRate);
+ uint32_t sampleRate,
+ status_t *status);
void closeOutputStream(AudioStreamOutGeneric* out);
void closeInputStream(AudioStreamInGeneric* in);
@@ -120,7 +124,7 @@ protected:
private:
status_t dumpInternals(int fd, const Vector<String16>& args);
-
+
Mutex mLock;
AudioStreamOutGeneric *mOutput;
AudioStreamInGeneric *mInput;