The Sound class represents a Scratch sound.
More...
#include <scratchcpp/sound.h>
The Sound class represents a Scratch sound.
◆ Effect
◆ Sound() [1/2]
| Sound::Sound |
( |
const std::string & | name, |
|
|
const std::string & | id, |
|
|
const std::string & | format ) |
◆ Sound() [2/2]
| libscratchcpp::Sound::Sound |
( |
const Sound & | | ) |
|
|
delete |
◆ ~Sound()
| virtual libscratchcpp::Sound::~Sound |
( |
| ) |
|
|
inlinevirtual |
◆ clone()
| std::shared_ptr< Sound > Sound::clone |
( |
| ) |
const |
Returns an independent copy of the sound which is valid for as long as the original sound exists.
◆ data()
| const void * Asset::data |
( |
| ) |
const |
|
inherited |
◆ dataFormat()
| const std::string & Asset::dataFormat |
( |
| ) |
const |
|
inherited |
Returns the name of the format of the asset file.
◆ dataSize()
| unsigned int Asset::dataSize |
( |
| ) |
const |
|
inherited |
Returns the size of the asset data.
◆ fileName()
| const std::string & Asset::fileName |
( |
| ) |
const |
|
inherited |
Returns the name of the asset file.
◆ id()
| const std::string & Entity::id |
( |
| ) |
const |
|
inherited |
◆ isClone()
| bool Sound::isClone |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ isPlaying()
| bool Sound::isPlaying |
( |
| ) |
const |
|
virtual |
Returns true if the sound is being played.
◆ name()
| const std::string & Asset::name |
( |
| ) |
const |
|
inherited |
Returns the name of the asset.
◆ owner()
| Thread * Sound::owner |
( |
| ) |
const |
◆ processData()
| void Sound::processData |
( |
unsigned int | size, |
|
|
void * | data ) |
|
overrideprotectedvirtual |
◆ rate()
| int Sound::rate |
( |
| ) |
const |
Returns the sampling rate of the sound in Hertz.
◆ sampleCount()
| int Sound::sampleCount |
( |
| ) |
const |
Returns the number of samples.
◆ setData()
| void Asset::setData |
( |
unsigned int | size, |
|
|
void * | data ) |
|
inherited |
Sets the asset data (will be deallocated when the object is destroyed).
◆ setEffect()
| void Sound::setEffect |
( |
Effect | effect, |
|
|
double | value ) |
|
virtual |
Sets the value of the given sound effect.
◆ setId()
| void Asset::setId |
( |
const std::string & | id | ) |
|
|
inherited |
Sets the ID (MD5 hash) of the asset file.
◆ setRate()
| void Sound::setRate |
( |
int | newRate | ) |
|
Sets the sampling rate of the sound in Hertz.
◆ setSampleCount()
| void Sound::setSampleCount |
( |
int | newSampleCount | ) |
|
Sets the number of samples.
◆ setTarget()
| void Asset::setTarget |
( |
Target * | target | ) |
|
|
inherited |
Sets the sprite or stage this asset belongs to.
◆ setVolume()
| void Sound::setVolume |
( |
double | volume | ) |
|
|
virtual |
Sets the volume percentage of the sound.
◆ start()
| void Sound::start |
( |
Thread * | owner = nullptr | ) |
|
|
virtual |
Starts the playback of the sound.
◆ stop()
Stops the playback of the sound.
◆ target()
| Target * Asset::target |
( |
| ) |
const |
|
inherited |
Returns the sprite or stage this asset belongs to.
The documentation for this class was generated from the following files: