Tizen Native API
6.0
|
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
int player_audio_effect_equalizer_clear | ( | player_h | player | ) |
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] player The handle to the media player
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_INVALID_OPERATION Invalid operation PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [out] available If true
the specified audio effect is available, otherwisefalse
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
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] player The handle to the media player [in] index The index of the requested equalizer band [out] frequency The frequency of the given band [dB]
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [in] index The index of the requested equalizer band [out] range The frequency range of the given band [dB]
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [in] index The index of the requested equalizer band [out] level The gain in decibel of the given band [dB]
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [out] count The number of equalizer bands
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [out] min The minimum value to be set [dB] [out] max The maximum value to be set [dB]
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_INVALID_OPERATION Invalid operation PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [in] band_levels The list of band levels to be set [in] length The length of the band level
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
PLAYER_ERROR_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_INVALID_OPERATION Invalid operation PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)
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] player The handle to the media player [in] index The index of the equalizer band to be set [in] level The 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_NONE Successful PLAYER_ERROR_INVALID_PARAMETER Invalid parameter PLAYER_ERROR_INVALID_OPERATION Invalid operation PLAYER_ERROR_NOT_AVAILABLE Not available (Since 5.5)