Loading include/media/AudioSystem.h +16 −10 Original line number Diff line number Diff line Loading @@ -87,9 +87,12 @@ public: static float linearToLog(int volume); static int logToLinear(float volume); static status_t getOutputSamplingRate(int* samplingRate, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); 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); static status_t getOutputSamplingRate(int* samplingRate, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); 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); static status_t getSamplingRate(audio_io_handle_t output, audio_stream_type_t streamType, int* samplingRate); Loading Loading @@ -126,7 +129,8 @@ public: // - BAD_VALUE: invalid parameter // NOTE: this feature is not supported on all hardware platforms and it is // necessary to check returned status before using the returned values. static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // return the number of input frames lost by HAL implementation, or 0 if the handle is invalid static unsigned int getInputFramesLost(audio_io_handle_t ioHandle); Loading @@ -147,8 +151,8 @@ public: NUM_CONFIG_EVENTS }; // audio output descriptor used to cache output configurations in client process to avoid frequent calls // through IAudioFlinger // audio output descriptor used to cache output configurations in client process to avoid // frequent calls through IAudioFlinger class OutputDescriptor { public: OutputDescriptor() Loading @@ -162,8 +166,8 @@ public: }; // Events used to synchronize actions between audio sessions. // For instance SYNC_EVENT_PRESENTATION_COMPLETE can be used to delay recording start until playback // is complete on another audio session. // For instance SYNC_EVENT_PRESENTATION_COMPLETE can be used to delay recording start until // playback is complete on another audio session. // See definitions in MediaSyncEvent.java enum sync_event_t { SYNC_EVENT_SAME = -1, // used internally to indicate restart with same event Loading @@ -183,8 +187,10 @@ public: // // IAudioPolicyService interface (see AudioPolicyInterface for method descriptions) // static status_t setDeviceConnectionState(audio_devices_t device, audio_policy_dev_state_t state, const char *device_address); static audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address); static status_t setDeviceConnectionState(audio_devices_t device, audio_policy_dev_state_t state, const char *device_address); static audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address); static status_t setPhoneState(audio_mode_t state); static status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config); static audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage); Loading include/media/AudioTrack.h +16 −8 Original line number Diff line number Diff line Loading @@ -53,9 +53,12 @@ public: enum event_type { EVENT_MORE_DATA = 0, // Request to write more data to PCM buffer. EVENT_UNDERRUN = 1, // PCM buffer underrun occured. EVENT_LOOP_END = 2, // Sample loop end was reached; playback restarted from loop start if loop count was not 0. EVENT_MARKER = 3, // Playback head is at the specified marker position (See setMarkerPosition()). EVENT_NEW_POS = 4, // Playback head is at a new position (See setPositionUpdatePeriod()). EVENT_LOOP_END = 2, // Sample loop end was reached; playback restarted from // loop start if loop count was not 0. EVENT_MARKER = 3, // Playback head is at the specified marker position // (See setMarkerPosition()). EVENT_NEW_POS = 4, // Playback head is at a new position // (See setPositionUpdatePeriod()). EVENT_BUFFER_END = 5 // Playback head is at the end of the buffer. }; Loading Loading @@ -312,7 +315,8 @@ public: /* Sets marker position. When playback reaches the number of frames specified, a callback with * event type EVENT_MARKER is called. Calling setMarkerPosition with marker == 0 cancels marker * notification callback. * If the AudioTrack has been opened with no callback function associated, the operation will fail. * If the AudioTrack has been opened with no callback function associated, the operation will * fail. * * Parameters: * Loading @@ -330,7 +334,8 @@ public: * a callback with event type EVENT_NEW_POS is called. * Calling setPositionUpdatePeriod with updatePeriod == 0 cancels new position notification * callback. * If the AudioTrack has been opened with no callback function associated, the operation will fail. * If the AudioTrack has been opened with no callback function associated, the operation will * fail. * * Parameters: * Loading Loading @@ -359,7 +364,8 @@ public: * Returned status (from utils/Errors.h) can be: * - NO_ERROR: successful operation * - INVALID_OPERATION: the AudioTrack is not stopped. * - BAD_VALUE: The specified position is beyond the number of frames present in AudioTrack buffer * - BAD_VALUE: The specified position is beyond the number of frames present in AudioTrack * buffer */ status_t setPosition(uint32_t position); status_t getPosition(uint32_t *position); Loading Loading @@ -518,8 +524,10 @@ protected: callback_t mCbf; // callback handler for events, or NULL void* mUserData; uint32_t mNotificationFramesReq; // requested number of frames between each notification callback uint32_t mNotificationFramesAct; // actual number of frames between each notification callback uint32_t mNotificationFramesReq; // requested number of frames between each // notification callback uint32_t mNotificationFramesAct; // actual number of frames between each // notification callback sp<IMemory> mSharedBuffer; int mLoopCount; uint32_t mRemainingFrames; Loading include/media/EffectsFactoryApi.h +10 −8 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ int EffectQueryNumberEffects(uint32_t *pNumEffects); // -ENOENT no more effect available // -ENODEV factory failed to initialize // -EINVAL invalid pDescriptor // -ENOSYS effect list has changed since last execution of EffectQueryNumberEffects() // -ENOSYS effect list has changed since last execution of // EffectQueryNumberEffects() // *pDescriptor: updated with the effect descriptor. // //////////////////////////////////////////////////////////////////////////////// Loading @@ -91,12 +92,12 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor); // // Input: // pEffectUuid: pointer to the effect uuid. // sessionId: audio session to which this effect instance will be attached. All effects created // with the same session ID are connected in series and process the same signal stream. // Knowing that two effects are part of the same effect chain can help the library implement // some kind of optimizations. // ioId: identifies the output or input stream this effect is directed to at audio HAL. For future // use especially with tunneled HW accelerated effects // sessionId: audio session to which this effect instance will be attached. All effects // created with the same session ID are connected in series and process the same signal // stream. Knowing that two effects are part of the same effect chain can help the // library implement some kind of optimizations. // ioId: identifies the output or input stream this effect is directed to at audio HAL. // For future use especially with tunneled HW accelerated effects // // Input/Output: // pHandle: address where to return the effect handle. Loading @@ -109,7 +110,8 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor); // *pHandle: updated with the effect handle. // //////////////////////////////////////////////////////////////////////////////// int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, effect_handle_t *pHandle); int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, effect_handle_t *pHandle); //////////////////////////////////////////////////////////////////////////////// // Loading include/media/IAudioFlinger.h +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ public: virtual status_t setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs) = 0; virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys) const = 0; virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys) const = 0; // register a current process for audio output change notifications virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0; Loading include/media/IAudioPolicyService.h +3 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public: virtual audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address) = 0; virtual status_t setPhoneState(audio_mode_t state) = 0; virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) = 0; virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) = 0; virtual audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage) = 0; virtual audio_io_handle_t getOutput(audio_stream_type_t stream, uint32_t samplingRate = 0, Loading Loading
include/media/AudioSystem.h +16 −10 Original line number Diff line number Diff line Loading @@ -87,9 +87,12 @@ public: static float linearToLog(int volume); static int logToLinear(float volume); static status_t getOutputSamplingRate(int* samplingRate, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); 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); static status_t getOutputSamplingRate(int* samplingRate, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); 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); static status_t getSamplingRate(audio_io_handle_t output, audio_stream_type_t streamType, int* samplingRate); Loading Loading @@ -126,7 +129,8 @@ public: // - BAD_VALUE: invalid parameter // NOTE: this feature is not supported on all hardware platforms and it is // necessary to check returned status before using the returned values. static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // return the number of input frames lost by HAL implementation, or 0 if the handle is invalid static unsigned int getInputFramesLost(audio_io_handle_t ioHandle); Loading @@ -147,8 +151,8 @@ public: NUM_CONFIG_EVENTS }; // audio output descriptor used to cache output configurations in client process to avoid frequent calls // through IAudioFlinger // audio output descriptor used to cache output configurations in client process to avoid // frequent calls through IAudioFlinger class OutputDescriptor { public: OutputDescriptor() Loading @@ -162,8 +166,8 @@ public: }; // Events used to synchronize actions between audio sessions. // For instance SYNC_EVENT_PRESENTATION_COMPLETE can be used to delay recording start until playback // is complete on another audio session. // For instance SYNC_EVENT_PRESENTATION_COMPLETE can be used to delay recording start until // playback is complete on another audio session. // See definitions in MediaSyncEvent.java enum sync_event_t { SYNC_EVENT_SAME = -1, // used internally to indicate restart with same event Loading @@ -183,8 +187,10 @@ public: // // IAudioPolicyService interface (see AudioPolicyInterface for method descriptions) // static status_t setDeviceConnectionState(audio_devices_t device, audio_policy_dev_state_t state, const char *device_address); static audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address); static status_t setDeviceConnectionState(audio_devices_t device, audio_policy_dev_state_t state, const char *device_address); static audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address); static status_t setPhoneState(audio_mode_t state); static status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config); static audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage); Loading
include/media/AudioTrack.h +16 −8 Original line number Diff line number Diff line Loading @@ -53,9 +53,12 @@ public: enum event_type { EVENT_MORE_DATA = 0, // Request to write more data to PCM buffer. EVENT_UNDERRUN = 1, // PCM buffer underrun occured. EVENT_LOOP_END = 2, // Sample loop end was reached; playback restarted from loop start if loop count was not 0. EVENT_MARKER = 3, // Playback head is at the specified marker position (See setMarkerPosition()). EVENT_NEW_POS = 4, // Playback head is at a new position (See setPositionUpdatePeriod()). EVENT_LOOP_END = 2, // Sample loop end was reached; playback restarted from // loop start if loop count was not 0. EVENT_MARKER = 3, // Playback head is at the specified marker position // (See setMarkerPosition()). EVENT_NEW_POS = 4, // Playback head is at a new position // (See setPositionUpdatePeriod()). EVENT_BUFFER_END = 5 // Playback head is at the end of the buffer. }; Loading Loading @@ -312,7 +315,8 @@ public: /* Sets marker position. When playback reaches the number of frames specified, a callback with * event type EVENT_MARKER is called. Calling setMarkerPosition with marker == 0 cancels marker * notification callback. * If the AudioTrack has been opened with no callback function associated, the operation will fail. * If the AudioTrack has been opened with no callback function associated, the operation will * fail. * * Parameters: * Loading @@ -330,7 +334,8 @@ public: * a callback with event type EVENT_NEW_POS is called. * Calling setPositionUpdatePeriod with updatePeriod == 0 cancels new position notification * callback. * If the AudioTrack has been opened with no callback function associated, the operation will fail. * If the AudioTrack has been opened with no callback function associated, the operation will * fail. * * Parameters: * Loading Loading @@ -359,7 +364,8 @@ public: * Returned status (from utils/Errors.h) can be: * - NO_ERROR: successful operation * - INVALID_OPERATION: the AudioTrack is not stopped. * - BAD_VALUE: The specified position is beyond the number of frames present in AudioTrack buffer * - BAD_VALUE: The specified position is beyond the number of frames present in AudioTrack * buffer */ status_t setPosition(uint32_t position); status_t getPosition(uint32_t *position); Loading Loading @@ -518,8 +524,10 @@ protected: callback_t mCbf; // callback handler for events, or NULL void* mUserData; uint32_t mNotificationFramesReq; // requested number of frames between each notification callback uint32_t mNotificationFramesAct; // actual number of frames between each notification callback uint32_t mNotificationFramesReq; // requested number of frames between each // notification callback uint32_t mNotificationFramesAct; // actual number of frames between each // notification callback sp<IMemory> mSharedBuffer; int mLoopCount; uint32_t mRemainingFrames; Loading
include/media/EffectsFactoryApi.h +10 −8 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ int EffectQueryNumberEffects(uint32_t *pNumEffects); // -ENOENT no more effect available // -ENODEV factory failed to initialize // -EINVAL invalid pDescriptor // -ENOSYS effect list has changed since last execution of EffectQueryNumberEffects() // -ENOSYS effect list has changed since last execution of // EffectQueryNumberEffects() // *pDescriptor: updated with the effect descriptor. // //////////////////////////////////////////////////////////////////////////////// Loading @@ -91,12 +92,12 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor); // // Input: // pEffectUuid: pointer to the effect uuid. // sessionId: audio session to which this effect instance will be attached. All effects created // with the same session ID are connected in series and process the same signal stream. // Knowing that two effects are part of the same effect chain can help the library implement // some kind of optimizations. // ioId: identifies the output or input stream this effect is directed to at audio HAL. For future // use especially with tunneled HW accelerated effects // sessionId: audio session to which this effect instance will be attached. All effects // created with the same session ID are connected in series and process the same signal // stream. Knowing that two effects are part of the same effect chain can help the // library implement some kind of optimizations. // ioId: identifies the output or input stream this effect is directed to at audio HAL. // For future use especially with tunneled HW accelerated effects // // Input/Output: // pHandle: address where to return the effect handle. Loading @@ -109,7 +110,8 @@ int EffectQueryEffect(uint32_t index, effect_descriptor_t *pDescriptor); // *pHandle: updated with the effect handle. // //////////////////////////////////////////////////////////////////////////////// int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, effect_handle_t *pHandle); int EffectCreate(const effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, effect_handle_t *pHandle); //////////////////////////////////////////////////////////////////////////////// // Loading
include/media/IAudioFlinger.h +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ public: virtual status_t setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs) = 0; virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys) const = 0; virtual String8 getParameters(audio_io_handle_t ioHandle, const String8& keys) const = 0; // register a current process for audio output change notifications virtual void registerClient(const sp<IAudioFlingerClient>& client) = 0; Loading
include/media/IAudioPolicyService.h +3 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ public: virtual audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address) = 0; virtual status_t setPhoneState(audio_mode_t state) = 0; virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) = 0; virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) = 0; virtual audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage) = 0; virtual audio_io_handle_t getOutput(audio_stream_type_t stream, uint32_t samplingRate = 0, Loading