diff options
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r-- | include/media/AudioTrack.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index b5256f0..fd51b8f 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -239,6 +239,9 @@ public: * Parameters not listed in the AudioTrack constructors above: * * threadCanCallJava: Whether callbacks are made from an attached thread and thus can call JNI. + * + * Internal state post condition: + * (mStreamType == AUDIO_STREAM_DEFAULT) implies this AudioTrack has valid attributes */ status_t set(audio_stream_type_t streamType, uint32_t sampleRate, @@ -273,7 +276,7 @@ public: /* getters, see constructors and set() */ - audio_stream_type_t streamType() const { return mStreamType; } + audio_stream_type_t streamType() const; audio_format_t format() const { return mFormat; } /* Return frame size in bytes, which for linear PCM is @@ -598,9 +601,6 @@ protected: AudioTrack& operator = (const AudioTrack& other); void setAttributesFromStreamType(audio_stream_type_t streamType); - void setStreamTypeFromAttributes(audio_attributes_t& aa); - /* paa is guaranteed non-NULL */ - bool isValidAttributes(const audio_attributes_t *paa); /* a small internal class to handle the callback */ class AudioTrackThread : public Thread @@ -688,7 +688,8 @@ protected: // constant after constructor or set() audio_format_t mFormat; // as requested by client, not forced to 16-bit - audio_stream_type_t mStreamType; + audio_stream_type_t mStreamType; // mStreamType == AUDIO_STREAM_DEFAULT implies + // this AudioTrack has valid attributes uint32_t mChannelCount; audio_channel_mask_t mChannelMask; sp<IMemory> mSharedBuffer; |