YARP
Yet Another Robot Platform
SoundFileMp3.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_MP3_H
8 #define YARP_SIG_SOUNDFILE_MP3_H
9 
10 #include <yarp/sig/Sound.h>
11 
12 namespace yarp {
13  namespace sig{
14  namespace file {
21  bool YARP_sig_API read_mp3_bytestream(Sound& data, const char* bytestream, size_t streamsize);
22 
29  bool YARP_sig_API read_mp3_file(Sound& data, const char* filename);
30 
38  bool YARP_sig_API write_mp3_file(const Sound& data, const char* filename, size_t bitrate=64000);
39  }
40  }
41 }
42 
43 #endif // YARP_SIG_SOUNDFILE_MP3_H
bool write_mp3_file(const Sound &data, const char *filename, size_t bitrate=64000)
Write a sound to a mp3 file.
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.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_sig_API
Definition: api.h:18