Sha256: f7394c76dd235020675ce23fc1ad369d1a21a6f999c6c34c0ad9a154dea2f49c

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

/*
 * Supported audio file formats and utilities to deal with them.
 */

#ifndef _SEAL_FMT_H_
#define _SEAL_FMT_H_

#include "err.h"

enum seal_fmt_t
{
    SEAL_UNKNOWN_FMT,
    SEAL_WAV_FMT,
    SEAL_OV_FMT,
    SEAL_MPG_FMT
};

/* Audio file formats. */
typedef enum seal_fmt_t seal_fmt_t;

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Tries to recognize an audio file's format by peeking its header. Use of
 * this function is by no mean an accurate way to determine the exact encoding
 * of the audio file; it only considers the format directly supported by Seal
 * as if there are only these types of format in the world. Assumes `audio' is
 * at the beginning.
 *
 * @param filename  the filename of the audio
 * @param pfmt      the receiver of the format if recognized or otherwise
 *                  `SEAL_UNKNOWN_FMT'
 */
seal_err_t seal_recognize_fmt(const char* /*filename*/, seal_fmt_t* /*pfmt*/);

/*
 * Ensures an audio format is known.
 *
 * @param filename  the filename of the audio to check format of
 * @param pfmt      if `*pfmt' is not `SEAL_UNKNOWN_FMT' then do nothing;
 *                  otherwise the file format is checked and `pfmt' receives
 *                  the known format
 */
seal_err_t seal_ensure_fmt_known(
    const char* /*filename*/,
    seal_fmt_t* /*pfmt*/
);

#ifdef __cplusplus
}
#endif

#endif /* _SEAL_FMT_H_ */

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
seal-0.1.3 include/seal/fmt.h
seal-0.1.2 include/seal/fmt.h