Tizen Native API  5.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:

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
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
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.

Since :
2.3
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()
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
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
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
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
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
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
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
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
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
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
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
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
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()
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
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
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()