58 if (
strcmp(format.c_str(),
".wav") == 0)
62 else if (
strcmp(format.c_str(),
".mp3") == 0)
94 if (
strcmp(format.c_str(),
".wav") == 0)
98 else if (
strcmp(format.c_str(),
".mp3") == 0)
A mini-server for performing network communication in the background.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
An interface to the operating system, including Port based communication.
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
bool write_mp3_file(const Sound &data, const char *filename, size_t bitrate=64000)
Write a sound to a mp3 file.
bool read_wav_file(Sound &data, const char *filename)
Read a sound from a .wav audio file.
bool read_wav_bytestream(Sound &data, const char *bytestream, size_t streamsize)
Read a sound from a byte array.
bool write_bytestream(const Sound &data, char *bytestream, size_t &streamsize, std::string format)
Writes a sound to a byte array.
bool write_wav_bytestream(const Sound &data, char *bytestream, size_t &streamsize)
Write a sound to a byte array.
bool read_bytestream(Sound &data, const char *bytestream, size_t streamsize, std::string format)
Read a sound from a byte array.
bool write_mp3_bytestream(const Sound &data, char *bytestream, size_t &streamsize)
write a sound from a byte array.
bool read_mp3_file(Sound &data, const char *filename)
Read a sound from a .mp3 audio file.
bool read_mp3_bytestream(Sound &data, const char *bytestream, size_t streamsize)
Read a sound from a byte array.
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
bool write_wav_file(const Sound &data, const char *filename)
Write a sound to a .wav file.