]> git.sesse.net Git - vlc/blob - bindings/libvlcpp/src/audio.hpp
Use standard ASCII for ^H, ^I, ^M and escape
[vlc] / bindings / libvlcpp / src / audio.hpp
1 /*****************************************************************************
2  * audio.hpp: audio part of the media player
3  *****************************************************************************
4  * Copyright (C) 2010 the VideoLAN team
5  * $Id$
6  *
7  * Authors: RĂ©mi Duraffort <ivoire@videolan.org>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 #ifndef LIBVLCPP_AUDIO_HPP
25 #define LIBVLCPP_AUDIO_HPP
26
27 #include <vlc/libvlc.h>
28 #include <vlc/libvlc_media.h>
29 #include <vlc/libvlc_media_player.h>
30
31 #include "libvlc.hpp"
32
33 namespace libvlc
34 {
35
36 class MediaPlayer;
37
38 class Audio
39 {
40 public:
41     /**
42      * Toggle mute status
43      */
44     void toggleMute();
45
46     /**
47      * Get the mute status
48      * @return true if the sound is muted
49      */
50     int mute();
51
52     /**
53      * Set the mute status
54      * @param mute: true to mute, otherwise unmute
55      */
56     void setMute( int mute );
57
58     /**
59      * Get the current volume
60      * @return the current volume
61      */
62     int volume();
63
64     /**
65      * Set the volume
66      * @param volume: the new volume
67      */
68     void setVolume( int volume );
69
70
71     /**
72      * Get the current track
73      * @return the current audio track
74      */
75     int track();
76
77     /**
78      * Get the number of audio tracks
79      * @return the number of audio tracks
80      */
81     int trackCount();
82
83     /**
84      * Set the audio track
85      * @param track: the audio track
86      */
87     void setTrack( int track );
88
89     /**
90      * Get the current audio channel
91      * @return the current audio channel
92      */
93     int channel();
94
95     /**
96      * Set the audio channel
97      * @param channel: the new audio channel
98      */
99     void setChannel( int channel );
100
101     /** trackDescription */
102
103 private:
104     /** The media player instance of libvlc */
105     libvlc_media_player_t *m_player;
106
107     /**
108      * The constructor is private so only the MediaPlayer can create an instance of this class
109      */
110     Audio();
111
112     /** Destructor only used by the MediaPlayer associated with this class */
113     ~Audio();
114
115     /**
116      * Set the media player. This function can only be used by the MediaPlayer class
117      * @param player: the media player
118      */
119     void setMediaPlayer( libvlc_media_player_t *player);
120
121     /** Friend class */
122     friend class MediaPlayer;
123 };
124
125 };
126
127 #endif // LIBVLCPP_AUDIO_HPP
128