Okular

sound.h
1 /***************************************************************************
2  * Copyright (C) 2006 by Pino Toscano <[email protected]> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 #ifndef _OKULAR_SOUND_H_
11 #define _OKULAR_SOUND_H_
12 
13 #include "okularcore_export.h"
14 
15 #include <QByteArray>
16 #include <QString>
17 
18 namespace Okular
19 {
26 class OKULARCORE_EXPORT Sound
27 {
28 public:
32  enum SoundType {
34  Embedded
35  };
36 
41  Raw,
44  ALaw
45  };
46 
51  explicit Sound(const QByteArray &data);
52 
56  explicit Sound(const QString &url);
57 
61  ~Sound();
62 
66  SoundType soundType() const;
67 
71  QString url() const;
72 
76  QByteArray data() const;
77 
81  void setSamplingRate(double rate);
82 
86  double samplingRate() const;
87 
91  void setChannels(int channels);
92 
96  int channels() const;
97 
101  void setBitsPerSample(int bitsPerSample);
102 
106  int bitsPerSample() const;
107 
111  void setSoundEncoding(SoundEncoding encoding);
112 
116  SoundEncoding soundEncoding() const;
117 
118 private:
119  class Private;
120  Private *const d;
121 
122  Q_DISABLE_COPY(Sound)
123 };
124 
125 }
126 
127 #endif
Is not encoded.
Definition: sound.h:41
Is encoded with twos-complement values.
Definition: sound.h:42
global.h
Definition: action.h:19
Contains information about a sound object.
Definition: sound.h:26
SoundEncoding
Describes the encoding of the sound data.
Definition: sound.h:40
Is stored at external resource (e.g. url)
Definition: sound.h:33
Is ยต-law encoded.
Definition: sound.h:43
SoundType
Describes where the sound is stored.
Definition: sound.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Nov 27 2020 22:37:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.