summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/AudioPolicyService.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-05-06 15:35:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-06 15:35:34 +0000
commit7ebe2c64dea42a3fd4de34ccb877d23b7a4e8076 (patch)
treeaba8cbdf008c711cc6e11109e5b15f9f47ac4e52 /services/audiopolicy/AudioPolicyService.h
parentdfa829c3ca81fcd2eecaabfff630ac0f41453731 (diff)
parent711719885d7563068579abf347c366cf6bc906f5 (diff)
downloadframeworks_av-7ebe2c64dea42a3fd4de34ccb877d23b7a4e8076.zip
frameworks_av-7ebe2c64dea42a3fd4de34ccb877d23b7a4e8076.tar.gz
frameworks_av-7ebe2c64dea42a3fd4de34ccb877d23b7a4e8076.tar.bz2
am 71171988: am f655acf1: am 8fb04d47: Merge "Fix memory leak when filtering commands in insertCommand_l()"
* commit '711719885d7563068579abf347c366cf6bc906f5': Fix memory leak when filtering commands in insertCommand_l()
Diffstat (limited to 'services/audiopolicy/AudioPolicyService.h')
-rw-r--r--services/audiopolicy/AudioPolicyService.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/services/audiopolicy/AudioPolicyService.h b/services/audiopolicy/AudioPolicyService.h
index cdc90d0..28e3a4b 100644
--- a/services/audiopolicy/AudioPolicyService.h
+++ b/services/audiopolicy/AudioPolicyService.h
@@ -198,6 +198,8 @@ private:
void insertCommand_l(AudioCommand *command, int delayMs = 0);
private:
+ class AudioCommandData;
+
// descriptor for requested tone playback event
class AudioCommand {
@@ -212,41 +214,48 @@ private:
Condition mCond; // condition for status return
status_t mStatus; // command status
bool mWaitStatus; // true if caller is waiting for status
- void *mParam; // command parameter (ToneData, VolumeData, ParametersData)
+ AudioCommandData *mParam; // command specific parameter data
+ };
+
+ class AudioCommandData {
+ public:
+ virtual ~AudioCommandData() {}
+ protected:
+ AudioCommandData() {}
};
- class ToneData {
+ class ToneData : public AudioCommandData {
public:
ToneGenerator::tone_type mType; // tone type (START_TONE only)
audio_stream_type_t mStream; // stream type (START_TONE only)
};
- class VolumeData {
+ class VolumeData : public AudioCommandData {
public:
audio_stream_type_t mStream;
float mVolume;
audio_io_handle_t mIO;
};
- class ParametersData {
+ class ParametersData : public AudioCommandData {
public:
audio_io_handle_t mIO;
String8 mKeyValuePairs;
};
- class VoiceVolumeData {
+ class VoiceVolumeData : public AudioCommandData {
public:
float mVolume;
};
- class StopOutputData {
+ class StopOutputData : public AudioCommandData {
public:
audio_io_handle_t mIO;
audio_stream_type_t mStream;
int mSession;
};
- class ReleaseOutputData {
+ class ReleaseOutputData : public AudioCommandData {
public:
audio_io_handle_t mIO;
};