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

◆ SoundEncoding

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.

◆ SoundType

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() [1/2]

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() [2/2]

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::~Sound ( )

Destroys the sound object.

Definition at line 56 of file sound.cpp.

Member Function Documentation

◆ bitsPerSample()

int Sound::bitsPerSample ( ) const

Returns the bits per sample rate.

Definition at line 96 of file sound.cpp.

◆ channels()

int Sound::channels ( ) const

Returns the number of channels.

Definition at line 86 of file sound.cpp.

◆ data()

QByteArray Sound::data ( ) const

Returns the embedded sound data.

Definition at line 71 of file sound.cpp.

◆ samplingRate()

double Sound::samplingRate ( ) const

Returns the sampling rate.

Definition at line 76 of file sound.cpp.

◆ setBitsPerSample()

void Sound::setBitsPerSample ( int bitsPerSample)

Sets the bits per sample bitsPerSample.

Definition at line 101 of file sound.cpp.

◆ setChannels()

void Sound::setChannels ( int channels)

Sets the number of channels.

Definition at line 91 of file sound.cpp.

◆ setSamplingRate()

void Sound::setSamplingRate ( double rate)

Sets the sampling rate.

Definition at line 81 of file sound.cpp.

◆ setSoundEncoding()

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

Sets the type of sound encoding.

Definition at line 111 of file sound.cpp.

◆ soundEncoding()

Sound::SoundEncoding Sound::soundEncoding ( ) const

Returns the sound encoding.

Definition at line 106 of file sound.cpp.

◆ soundType()

Sound::SoundType Sound::soundType ( ) const

Returns the type of the sound object.

Definition at line 61 of file sound.cpp.

◆ url()

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-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:49:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.