okular
sound.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _OKULAR_SOUND_H_
00011 #define _OKULAR_SOUND_H_
00012
00013 #include <okular/core/okular_export.h>
00014
00015 #include <QtCore/QByteArray>
00016 #include <QtCore/QString>
00017
00018 namespace Okular {
00019
00026 class OKULAR_EXPORT Sound
00027 {
00028 public:
00032 enum SoundType {
00033 External,
00034 Embedded
00035 };
00036
00040 enum SoundEncoding {
00041 Raw,
00042 Signed,
00043 muLaw,
00044 ALaw
00045 };
00046
00051 explicit Sound( const QByteArray& data );
00052
00056 explicit Sound( const QString& filename );
00057
00061 ~Sound();
00062
00066 SoundType soundType() const;
00067
00071 QString url() const;
00072
00076 QByteArray data() const;
00077
00081 void setSamplingRate( double rate );
00082
00086 double samplingRate() const;
00087
00091 void setChannels( int channels );
00092
00096 int channels() const;
00097
00101 void setBitsPerSample( int rate );
00102
00106 int bitsPerSample() const;
00107
00111 void setSoundEncoding( SoundEncoding encoding );
00112
00116 SoundEncoding soundEncoding() const;
00117
00118 private:
00119 class Private;
00120 Private* const d;
00121
00122 Q_DISABLE_COPY( Sound )
00123 };
00124
00125 }
00126
00127 #endif