diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index 08035147e8b2..040e6510f5cc 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -2217,16 +2217,16 @@ LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi, */ /** - * Audio channels + * Audio stereo modes */ -typedef enum libvlc_audio_output_channel_t { - libvlc_AudioChannel_Error = -1, - libvlc_AudioChannel_Stereo = 1, - libvlc_AudioChannel_RStereo = 2, - libvlc_AudioChannel_Left = 3, - libvlc_AudioChannel_Right = 4, - libvlc_AudioChannel_Dolbys = 5 -} libvlc_audio_output_channel_t; +typedef enum libvlc_audio_output_stereomode_t { + libvlc_AudioStereoMode_Error = -1, + libvlc_AudioStereoMode_Stereo = 1, + libvlc_AudioStereoMode_RStereo = 2, + libvlc_AudioStereoMode_Left = 3, + libvlc_AudioStereoMode_Right = 4, + libvlc_AudioStereoMode_Dolbys = 5 +} libvlc_audio_output_stereomode_t; /** @@ -2409,21 +2409,24 @@ LIBVLC_API int libvlc_audio_get_volume( libvlc_media_player_t *p_mi ); LIBVLC_API int libvlc_audio_set_volume( libvlc_media_player_t *p_mi, int i_volume ); /** - * Get current audio channel. + * Get current audio stereo-mode. * * \param p_mi media player - * \return the audio channel \see libvlc_audio_output_channel_t + * \return the audio stereo-mode, \see libvlc_audio_output_stereomode_t + * \version LibVLC 4.0.0 or later */ -LIBVLC_API int libvlc_audio_get_channel( libvlc_media_player_t *p_mi ); +LIBVLC_API libvlc_audio_output_stereomode_t libvlc_audio_get_stereomode( libvlc_media_player_t *p_mi ); /** - * Set current audio channel. + * Set current audio stereo-mode. * * \param p_mi media player - * \param channel the audio channel, \see libvlc_audio_output_channel_t + * \param channel the audio stereo-mode, \see libvlc_audio_output_stereomode_t * \return 0 on success, -1 on error + * \version LibVLC 4.0.0 or later */ -LIBVLC_API int libvlc_audio_set_channel( libvlc_media_player_t *p_mi, int channel ); +LIBVLC_API int libvlc_audio_set_stereomode( libvlc_media_player_t *p_mi, + libvlc_audio_output_stereomode_t mode ); /** * Get current audio delay. diff --git a/lib/audio.c b/lib/audio.c index 48763320fa67..60e54819eb32 100644 --- a/lib/audio.c +++ b/lib/audio.c @@ -348,9 +348,9 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track ) } /***************************************************************************** - * libvlc_audio_get_channel : Get the current audio channel + * libvlc_audio_get_stereomode : Get the current audio stereo-mode *****************************************************************************/ -int libvlc_audio_get_channel( libvlc_media_player_t *mp ) +libvlc_audio_output_stereomode_t libvlc_audio_get_stereomode( libvlc_media_player_t *mp ) { audio_output_t *p_aout = GetAOut( mp ); if( !p_aout ) @@ -362,9 +362,9 @@ int libvlc_audio_get_channel( libvlc_media_player_t *mp ) } /***************************************************************************** - * libvlc_audio_set_channel : Set the current audio channel + * libvlc_audio_set_stereomode : Set the current audio stereo-mode *****************************************************************************/ -int libvlc_audio_set_channel( libvlc_media_player_t *mp, int channel ) +int libvlc_audio_set_stereomode( libvlc_media_player_t *mp, libvlc_audio_output_stereomode_t mode ) { audio_output_t *p_aout = GetAOut( mp ); int ret = 0; @@ -372,9 +372,9 @@ int libvlc_audio_set_channel( libvlc_media_player_t *mp, int channel ) if( !p_aout ) return -1; - if( var_SetInteger( p_aout, "stereo-mode", channel ) < 0 ) + if( var_SetInteger( p_aout, "stereo-mode", mode ) < 0 ) { - libvlc_printerr( "Audio channel out of range" ); + libvlc_printerr( "Audio stereo-mode out of range" ); ret = -1; } aout_Release(p_aout); diff --git a/lib/libvlc.sym b/lib/libvlc.sym index 5403b2a9b301..83d3157a7c0d 100644 --- a/lib/libvlc.sym +++ b/lib/libvlc.sym @@ -19,14 +19,14 @@ libvlc_audio_output_device_set libvlc_audio_output_list_get libvlc_audio_output_list_release libvlc_audio_output_set -libvlc_audio_get_channel +libvlc_audio_get_stereomode libvlc_audio_get_delay libvlc_audio_get_mute libvlc_audio_get_track libvlc_audio_get_track_count libvlc_audio_get_track_description libvlc_audio_get_volume -libvlc_audio_set_channel +libvlc_audio_set_stereomode libvlc_audio_set_delay libvlc_audio_set_mute libvlc_audio_set_track