1 /*****************************************************************************
2 * audio.cpp: audio part of the media player
3 *****************************************************************************
4 * Copyright (C) 2010 the VideoLAN team
7 * Authors: RĂ©mi Duraffort <ivoire@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
27 using namespace libvlc;
29 Audio::Audio( libvlc_media_player_t *player )
32 libvlc_media_player_retain( m_player );
37 libvlc_media_player_release( m_player );
40 void Audio::toggleMute()
42 libvlc_audio_toggle_mute( m_player );
47 return libvlc_audio_get_mute( m_player );
50 void Audio::setMute( int mute )
52 libvlc_audio_set_mute( m_player, mute );
57 return libvlc_audio_get_volume( m_player );
60 void Audio::setVolume( int volume )
62 libvlc_audio_set_volume( m_player, volume );
67 return libvlc_audio_get_track( m_player );
70 int Audio::trackCount()
72 return libvlc_audio_get_track_count( m_player );
75 void Audio::setTrack( int track )
77 libvlc_audio_set_track( m_player, track );