Tizen Native API  7.0
Audio Effect

The Audio Effect API provides functions to control the audio effect.

Required Header

#include <player.h>

Overview

The Audio effect API allows you to apply effects to the player:

  • Equalizer

Functions

int player_audio_effect_get_equalizer_bands_count (player_h player, int *count)
 Gets the number of equalizer bands.
int player_audio_effect_set_equalizer_band_level (player_h player, int index, int level)
 Sets the gain set for the given equalizer band.
int player_audio_effect_get_equalizer_band_level (player_h player, int index, int *level)
 Gets the gain set for the given equalizer band.
int player_audio_effect_set_equalizer_all_bands (player_h player, int *band_levels, int length)
 Sets all bands of the equalizer.
int player_audio_effect_get_equalizer_level_range (player_h player, int *min, int *max)
 Gets the valid band level range of the equalizer.
int player_audio_effect_get_equalizer_band_frequency (player_h player, int index, int *frequency)
 Gets the band frequency of the equalizer.
int player_audio_effect_get_equalizer_band_frequency_range (player_h player, int index, int *range)
 Gets the band frequency range of the equalizer.
int player_audio_effect_equalizer_clear (player_h player)
 Clears the equalizer effect.
int player_audio_effect_equalizer_is_available (player_h player, bool *available)
 Checks whether the custom equalizer effect is available.

Function Documentation

Clears the equalizer effect.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_set_equalizer_band_level()
player_audio_effect_set_equalizer_all_bands()
int player_audio_effect_equalizer_is_available ( player_h  player,
bool *  available 
)

Checks whether the custom equalizer effect is available.

This function returns the availability of the audio effect function group and it could be unavailable depending on the platform capabilities.

Since :
2.3.1
Remarks:
If audio offload is enabled by calling player_audio_offload_set_enabled(), available will be false.
Parameters:
[in]playerThe handle to the media player
[out]availableIf true the specified audio effect is available, otherwise false
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
player_audio_effect_set_equalizer_band_level()
player_audio_effect_set_equalizer_all_bands()
player_audio_offload_set_enabled()
player_audio_offload_is_enabled()
player_set_audio_codec_type()
player_get_audio_codec_type()
int player_audio_effect_get_equalizer_band_frequency ( player_h  player,
int  index,
int *  frequency 
)

Gets the band frequency of the equalizer.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[in]indexThe index of the requested equalizer band
[out]frequencyThe frequency of the given band [dB]
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
int player_audio_effect_get_equalizer_band_frequency_range ( player_h  player,
int  index,
int *  range 
)

Gets the band frequency range of the equalizer.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[in]indexThe index of the requested equalizer band
[out]rangeThe frequency range of the given band [dB]
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
int player_audio_effect_get_equalizer_band_level ( player_h  player,
int  index,
int *  level 
)

Gets the gain set for the given equalizer band.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[in]indexThe index of the requested equalizer band
[out]levelThe gain in decibel of the given band [dB]
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_set_equalizer_band_level()
int player_audio_effect_get_equalizer_bands_count ( player_h  player,
int *  count 
)

Gets the number of equalizer bands.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[out]countThe number of equalizer bands
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_set_equalizer_band_level()
player_audio_effect_set_equalizer_all_bands()
int player_audio_effect_get_equalizer_level_range ( player_h  player,
int *  min,
int *  max 
)

Gets the valid band level range of the equalizer.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[out]minThe minimum value to be set [dB]
[out]maxThe maximum value to be set [dB]
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_set_equalizer_band_level()
player_audio_effect_set_equalizer_all_bands()
int player_audio_effect_set_equalizer_all_bands ( player_h  player,
int *  band_levels,
int  length 
)

Sets all bands of the equalizer.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE and this will not work at all even if it was called before enabling audio offload which makes audio effect function group unavailable. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[in]band_levelsThe list of band levels to be set
[in]lengthThe length of the band level
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_get_equalizer_bands_count()
player_audio_effect_get_equalizer_level_range()
player_audio_effect_set_equalizer_band_level()
player_audio_offload_set_enabled()
int player_audio_effect_set_equalizer_band_level ( player_h  player,
int  index,
int  level 
)

Sets the gain set for the given equalizer band.

Since :
2.3.1
Remarks:
If player_audio_effect_equalizer_is_available() returns available parameter as false, this function will return PLAYER_ERROR_NOT_AVAILABLE and this will not work at all even if it was called before enabling audio offload which makes audio effect function group unavailable. (Since 5.5)
Parameters:
[in]playerThe handle to the media player
[in]indexThe index of the equalizer band to be set
[in]levelThe new gain in decibel that is set to the given band [dB]
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_NOT_AVAILABLENot available (Since 5.5)
See also:
player_audio_effect_equalizer_is_available()
player_audio_effect_get_equalizer_bands_count()
player_audio_effect_get_equalizer_level_range()
player_audio_effect_get_equalizer_band_level()
player_audio_effect_set_equalizer_all_bands()
player_audio_offload_set_enabled()