#include <sound.h>
Inheritance diagram for Wt::Sound:
Public Member Functions | |
Sound (const std::string &filename) | |
Sound () | |
const std::string & | fileName () const |
bool | isFinished () const |
void | play () |
void | stop () |
Static Public Member Functions | |
static bool | available () |
static bool | isAvailable () |
static void | play (const std::string &filename) |
Protected Member Functions | |
void | detach () |
Private Types | |
typedef boost::shared_ptr< Audio::Chunk > | Ptr |
Private Attributes | |
Ptr | chunk |
std::string | filename_ |
Definition at line 34 of file sound.h.
typedef boost::shared_ptr<Audio::Chunk> Wt::Sound::Ptr [private] |
Wt::Sound::Sound | ( | const std::string & | filename | ) |
Definition at line 25 of file sound.cpp.
00026 : chunk(Audio::instance()->loadChunk(filename)), 00027 filename_(filename) {}
Wt::Sound::Sound | ( | ) |
bool Wt::Sound::available | ( | ) | [static] |
Definition at line 61 of file sound.cpp.
References Wt::Singleton< DERIVED >::instance().
00061 { 00062 return Audio::instance()->isAvailable(); 00063 }
Here is the call graph for this function:
void Wt::Sound::detach | ( | ) | [protected] |
const std::string & Wt::Sound::fileName | ( | ) | const |
bool Wt::Sound::isAvailable | ( | ) | [static] |
Definition at line 65 of file sound.cpp.
References Wt::Singleton< DERIVED >::instance().
00065 { 00066 return Audio::instance()->isAvailable(); 00067 }
Here is the call graph for this function:
bool Wt::Sound::isFinished | ( | ) | const |
void Wt::Sound::play | ( | const std::string & | filename | ) | [static] |
Definition at line 73 of file sound.cpp.
References Wt::Audio::Chunk::finished, Wt::finished_chunk(), Wt::Singleton< DERIVED >::instance(), and Wt::Audio::Chunk::play().
00073 { 00074 Audio::Chunk *c = Audio::instance()->loadChunk(filename); 00075 if (c) { 00076 c->finished.connect(sigc::slot1<void, 00077 Audio::Chunk *>(sigc::ptr_fun(&finished_chunk))); 00078 c->play(); 00079 } 00080 }
Here is the call graph for this function:
void Wt::Sound::play | ( | ) |
void Wt::Sound::stop | ( | ) |
Ptr Wt::Sound::chunk [private] |
std::string Wt::Sound::filename_ [private] |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.