YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SoundFile.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_SIG_SOUNDFILE_H
8#define YARP_SIG_SOUNDFILE_H
9
10#include <yarp/sig/Sound.h>
11
12namespace yarp::sig::file {
19bool YARP_sig_API read(Sound& data, const char* filename);
20
29bool YARP_sig_API read_bytestream(Sound& data, const char* bytestream, size_t streamsize, std::string format);
30
39bool YARP_sig_API write_bytestream(const Sound& data, char* bytestream, size_t& streamsize, std::string format);
40
41
48bool YARP_sig_API write(const Sound& data, const char* filename);
49
50} // namespace yarp::sig::file
51
52#endif // YARP_SIG_SOUNDFILE_H
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
bool write_bytestream(const Sound &data, char *bytestream, size_t &streamsize, std::string format)
Writes a sound to a byte array.
Definition SoundFile.cpp:92
bool read_bytestream(Sound &data, const char *bytestream, size_t streamsize, std::string format)
Read a sound from a byte array.
Definition SoundFile.cpp:56
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
#define YARP_sig_API
Definition api.h:18