2 * Copyright (c) 2018 AlaskanEmily
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include "cin_export.h"
13 #include "cin_format.h"
24 * @defgroup Loader Functions that play, stop, and destroy Loaders.
31 * @brief Errors that occur when manipulating a Loader.
33 enum Cin_LoaderError {
34 Cin_eLoaderSuccess, /**< No error occured */
35 Cin_eLoaderFailure, /**< An unspecified error occured */
36 Cin_eLoaderUnsupportedFormat, /**< The specified format is not supported */
37 Cin_eLoaderInvalidFormat, /**< The specified format is invalid */
38 Cin_eLoaderUnsupportedNumChannels, /**< Unsupported number of channels */
39 Cin_eLoaderUnsupportedSampleRate /**< Unsupported sample rate */
43 * @brief Returns the size of struct Cin_Loader
45 * The client is expected to allocate space for the Loader.
47 CIN_EXPORT(unsigned) Cin_StructLoaderSize();
49 CIN_EXPORT(enum Cin_LoaderError) Cin_CreateLoader(struct Cin_Loader *out,
50 struct Cin_Driver *drv,
53 enum Cin_Format format);
55 CIN_EXPORT(enum Cin_LoaderError) Cin_LoaderPut(struct Cin_Loader *ld,
59 CIN_EXPORT(enum Cin_LoaderError) Cin_LoaderFinalize(struct Cin_Loader *ld,
60 struct Cin_Sound *out);
62 /** @} */ /* End Loader group. */
68 #endif /* CIN_LOADER_H */