Okular::Sound

Search for usage in LXR

Okular::Sound Class Reference

#include <sound.h>

Public Types

enum  SoundEncoding { Raw, Signed, muLaw, ALaw }
 
enum  SoundType { External, Embedded }
 

Public Member Functions

 Sound (const QByteArray &data)
 
 Sound (const QString &url)
 
 ~Sound ()
 
int bitsPerSample () const
 
int channels () const
 
QByteArray data () const
 
double samplingRate () const
 
void setBitsPerSample (int bitsPerSample)
 
void setChannels (int channels)
 
void setSamplingRate (double rate)
 
void setSoundEncoding (SoundEncoding encoding)
 
SoundEncoding soundEncoding () const
 
SoundType soundType () const
 
QString url () const
 

Detailed Description

Contains information about a sound object.

This class encapsulates the information about a sound object which is used for links on enter/leave page event.

Definition at line 23 of file sound.h.

Member Enumeration Documentation

Describes the encoding of the sound data.

Enumerator
Raw 

Is not encoded.

Signed 

Is encoded with twos-complement values.

muLaw 

Is ยต-law encoded.

ALaw 

Is A-law encoded.

Definition at line 37 of file sound.h.

Describes where the sound is stored.

Enumerator
External 

Is stored at external resource (e.g. url)

Embedded 

Is stored embedded in the document.

Definition at line 29 of file sound.h.

Constructor & Destructor Documentation

Sound::Sound ( const QByteArray data)
explicit

Creates a new sound object with the given embedded sound data.

Definition at line 46 of file sound.cpp.

Sound::Sound ( const QString url)
explicit

Creates a new sound object with the given external url.

Definition at line 51 of file sound.cpp.

Sound::~Sound ( )

Destroys the sound object.

Definition at line 56 of file sound.cpp.

Member Function Documentation

int Sound::bitsPerSample ( ) const

Returns the bits per sample rate.

Definition at line 96 of file sound.cpp.

int Sound::channels ( ) const

Returns the number of channels.

Definition at line 86 of file sound.cpp.

QByteArray Sound::data ( ) const

Returns the embedded sound data.

Definition at line 71 of file sound.cpp.

double Sound::samplingRate ( ) const

Returns the sampling rate.

Definition at line 76 of file sound.cpp.

void Sound::setBitsPerSample ( int  bitsPerSample)

Sets the bits per sample bitsPerSample.

Definition at line 101 of file sound.cpp.

void Sound::setChannels ( int  channels)

Sets the number of channels.

Definition at line 91 of file sound.cpp.

void Sound::setSamplingRate ( double  rate)

Sets the sampling rate.

Definition at line 81 of file sound.cpp.

void Sound::setSoundEncoding ( Sound::SoundEncoding  soundEncoding)

Sets the type of sound encoding.

Definition at line 111 of file sound.cpp.

Sound::SoundEncoding Sound::soundEncoding ( ) const

Returns the sound encoding.

Definition at line 106 of file sound.cpp.

Sound::SoundType Sound::soundType ( ) const

Returns the type of the sound object.

Definition at line 61 of file sound.cpp.

QString Sound::url ( ) const

Returns the external storage url of the sound data.

Definition at line 66 of file sound.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 22 2021 22:36:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.