|
| | Sound (size_t bytesPerSample=2) |
| |
| | Sound (const Sound &alt) |
| | Copy constructor. More...
|
| |
| virtual | ~Sound () |
| |
| const Sound & | operator= (const Sound &alt) |
| | Assignment operator. More...
|
| |
| bool | operator== (const Sound &alt) const |
| | Comparison operator. More...
|
| |
| Sound & | operator+= (const Sound &alt) |
| | Addition assignment operator. More...
|
| |
| Sound | subSound (size_t first_sample, size_t last_sample) |
| | Returns a subpart of the sound. More...
|
| |
| void | resize (size_t samples, size_t channels=1) |
| | Set the sound size. More...
|
| |
| audio_sample | get (size_t sample, size_t channel=0) const |
| |
| void | set (audio_sample value, size_t sample, size_t channel=0) |
| |
| audio_sample | getSafe (size_t sample, size_t channel=0) const |
| |
| void | setSafe (audio_sample value, size_t sample, size_t channel=0) |
| |
| bool | isSample (size_t sample, size_t channel=0) const |
| | Check whether a sample lies within the sound. More...
|
| |
| void | clear () |
| | set all the samples to zero (silence) More...
|
| |
| void | normalizeChannel (size_t channel) |
| | Normalize a specific channel of the sound. More...
|
| |
| void | normalize () |
| | Normalize a sound (the peak is searched among all channels) More...
|
| |
| void | amplifyChannel (size_t channel, double gain) |
| | Amplify a specific channel of the sound. More...
|
| |
| void | amplify (double gain) |
| | amplify a sound More...
|
| |
| void | findPeakInChannel (size_t channelId, size_t &sampleId, audio_sample &sampleValue) const |
| | find the peak in a specific channel of the sound More...
|
| |
| void | findPeak (size_t &channelId, size_t &sampleId, audio_sample &sampleValue) const |
| | find the peak in a sound More...
|
| |
| double | sample2timestamp (size_t sampleid) const |
| | Utility function: return the timestamp (in seconds) given the sample id. More...
|
| |
| size_t | timestamp2sample (double time) const |
| | Utility function: return the sample id given the timestamp (in seconds) More...
|
| |
| bool | clearChannel (size_t channel) |
| | set to zero all the samples of the specified channel @ param channel the channel number More...
|
| |
| int | getFrequency () const |
| | Get the frequency of the sound (i.e. More...
|
| |
| void | setFrequency (int freq) |
| | Set the frequency of the sound (i.e. More...
|
| |
| size_t | getBytesPerSample () const |
| | Get the number of bytes per sample. More...
|
| |
| size_t | getSamples () const |
| | Get the number of samples contained in the sound. More...
|
| |
| double | getDuration () const |
| | Get the duration of sound in seconds. More...
|
| |
| size_t | getChannels () const |
| | Get the number of channels of the sound. More...
|
| |
| Sound | extractChannelAsSound (size_t channel_id) const |
| | Extract a single channel from the sound. More...
|
| |
| std::vector< std::reference_wrapper< audio_sample > > | getChannel (size_t channel_id) |
| |
| bool | replaceChannel (size_t id, Sound channel) |
| | Replace a single channel of our current sound with a given sound constituted by a single channel The two sounds must have the same number of samples. More...
|
| |
| std::vector< std::reference_wrapper< audio_sample > > | getInterleavedAudioRawData () const |
| | Returns a serialized version of the sound, in interleaved format, e.g. More...
|
| |
| std::vector< std::reference_wrapper< audio_sample > > | getNonInterleavedAudioRawData () const |
| | Returns a serialized version of the sound, in non-interleaved format, e.g. More...
|
| |
| std::string | toString () const |
| | Print matrix to a string. More...
|
| |
| bool | read (yarp::os::ConnectionReader &connection) override |
| | Read this object from a network connection. More...
|
| |
| bool | write (yarp::os::ConnectionWriter &connection) const override |
| | Write this object to a network connection. More...
|
| |
| virtual Type | getType () const |
| |
| virtual | ~PortReader () |
| | Destructor. More...
|
| |
| virtual Type | getReadType () const |
| |
| virtual | ~PortWriter () |
| | Destructor. More...
|
| |
| virtual void | onCompletion () const |
| | This is called when the port has finished all writing operations. More...
|
| |
| virtual void | onCommencement () const |
| | This is called when the port is about to begin writing operations. More...
|
| |
| virtual yarp::os::Type | getWriteType () const |
| |
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Definition at line 25 of file Sound.h.