Loading include/media/AudioSystem.h +6 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,12 @@ public: static status_t getOutputFrameCount(int* frameCount, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); static status_t getOutputLatency(uint32_t* latency, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // DEPRECATED static status_t getOutputSamplingRate(int* samplingRate, int stream = AUDIO_STREAM_DEFAULT); // DEPRECATED static status_t getOutputFrameCount(int* frameCount, int stream = AUDIO_STREAM_DEFAULT); static bool routedToA2dpOutput(audio_stream_type_t streamType); static status_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount, Loading include/media/AudioTrack.h +12 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,18 @@ public: int notificationFrames = 0, int sessionId = 0); // DEPRECATED explicit AudioTrack( int streamType, uint32_t sampleRate = 0, int format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, void* user = 0, int notificationFrames = 0, int sessionId = 0); /* Creates an audio track and registers it with AudioFlinger. With this constructor, * the PCM data to be rendered by AudioTrack is passed in a shared memory buffer * identified by the argument sharedBuffer. This prototype is for static buffer playback. Loading media/libmedia/AudioSystem.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,11 @@ int AudioSystem::logToLinear(float volume) return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0; } // DEPRECATED status_t AudioSystem::getOutputSamplingRate(int* samplingRate, int streamType) { return getOutputSamplingRate(samplingRate, (audio_stream_type_t)streamType); } status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type_t streamType) { OutputDescriptor *outputDesc; Loading Loading @@ -236,6 +241,11 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type return NO_ERROR; } // DEPRECATED status_t AudioSystem::getOutputFrameCount(int* frameCount, int streamType) { return getOutputFrameCount(frameCount, (audio_stream_type_t)streamType); } status_t AudioSystem::getOutputFrameCount(int* frameCount, audio_stream_type_t streamType) { OutputDescriptor *outputDesc; Loading media/libmedia/AudioTrack.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,25 @@ AudioTrack::AudioTrack( 0, false, sessionId); } AudioTrack::AudioTrack( int streamType, uint32_t sampleRate, int format, int channelMask, int frameCount, uint32_t flags, callback_t cbf, void* user, int notificationFrames, int sessionId) : mStatus(NO_INIT), mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT) { mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask, frameCount, flags, cbf, user, notificationFrames, 0, false, sessionId); } AudioTrack::AudioTrack( audio_stream_type_t streamType, uint32_t sampleRate, Loading Loading
include/media/AudioSystem.h +6 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,12 @@ public: static status_t getOutputFrameCount(int* frameCount, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); static status_t getOutputLatency(uint32_t* latency, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // DEPRECATED static status_t getOutputSamplingRate(int* samplingRate, int stream = AUDIO_STREAM_DEFAULT); // DEPRECATED static status_t getOutputFrameCount(int* frameCount, int stream = AUDIO_STREAM_DEFAULT); static bool routedToA2dpOutput(audio_stream_type_t streamType); static status_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount, Loading
include/media/AudioTrack.h +12 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,18 @@ public: int notificationFrames = 0, int sessionId = 0); // DEPRECATED explicit AudioTrack( int streamType, uint32_t sampleRate = 0, int format = AUDIO_FORMAT_DEFAULT, int channelMask = 0, int frameCount = 0, uint32_t flags = 0, callback_t cbf = 0, void* user = 0, int notificationFrames = 0, int sessionId = 0); /* Creates an audio track and registers it with AudioFlinger. With this constructor, * the PCM data to be rendered by AudioTrack is passed in a shared memory buffer * identified by the argument sharedBuffer. This prototype is for static buffer playback. Loading
media/libmedia/AudioSystem.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,11 @@ int AudioSystem::logToLinear(float volume) return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0; } // DEPRECATED status_t AudioSystem::getOutputSamplingRate(int* samplingRate, int streamType) { return getOutputSamplingRate(samplingRate, (audio_stream_type_t)streamType); } status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type_t streamType) { OutputDescriptor *outputDesc; Loading Loading @@ -236,6 +241,11 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type return NO_ERROR; } // DEPRECATED status_t AudioSystem::getOutputFrameCount(int* frameCount, int streamType) { return getOutputFrameCount(frameCount, (audio_stream_type_t)streamType); } status_t AudioSystem::getOutputFrameCount(int* frameCount, audio_stream_type_t streamType) { OutputDescriptor *outputDesc; Loading
media/libmedia/AudioTrack.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,25 @@ AudioTrack::AudioTrack( 0, false, sessionId); } AudioTrack::AudioTrack( int streamType, uint32_t sampleRate, int format, int channelMask, int frameCount, uint32_t flags, callback_t cbf, void* user, int notificationFrames, int sessionId) : mStatus(NO_INIT), mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(ANDROID_TGROUP_DEFAULT) { mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask, frameCount, flags, cbf, user, notificationFrames, 0, false, sessionId); } AudioTrack::AudioTrack( audio_stream_type_t streamType, uint32_t sampleRate, Loading