Eric Laurent d5da9de816 Stress test for AudioTrack shared memory bug
Changes in patch set 2:
 - add call to ProcessState::self()->startThreadPool()
 - remove dead code AudioSystem::get_audio_flinger
 - use simpler MemoryDealer isntead of MemoryHeapBase
 - AudioTrack now must be sp<> instead of raw pointer
 - use new constants from audio.h
 - change LOGx macros to ALOGx
 - fix file permission on Android.mk

Bug: 2801375
Change-Id: I899b08e0aa91deca328523f66f71e667011b4522
2013-09-11 12:48:17 -07:00

28 lines
586 B
C++

// Copyright 2008 The Android Open Source Project
#ifndef AUDIOTRACKTEST_H_
#define AUDIOTRACKTEST_H_
namespace android {
class AudioTrackTest{
public:
AudioTrackTest(void);
~AudioTrackTest() {};
void Execute(void);
int Test01();
void Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, long dPhi);
void InitSine();
short ComputeSine(long amplitude, long phi);
#define SIN_SZ 1024
short sin1024[SIN_SZ]; // sine table 2*pi = 1024
};
};
#endif /*AUDIOTRACKTEST_H_*/