Sha256: 32b202c684e7d259f6ed67413a64cadfba0033f7989a0b88f021a80f404b45ad

Contents?: true

Size: 820 Bytes

Versions: 6

Compression:

Stored size: 820 Bytes

Contents

#pragma once

#include <Gosu/IO.hpp>

#ifdef GOSU_IS_IPHONE
// Ignore OpenAL deprecation warnings. If macOS stops shipping OpenAL, it's more likely that we bundle our own version
// of it than that we switch to another audio API.
#define OPENAL_DEPRECATED
#include <OpenAL/al.h>
#else
#include <AL/al.h>
#endif

#include <cstddef>
#include <string>
#include <vector>

namespace Gosu
{
    class AudioFile
    {
        struct Impl;
        std::unique_ptr<Impl> pimpl;

    public:
        explicit AudioFile(const std::string& filename);
        explicit AudioFile(Reader reader);
        ~AudioFile();

        ALenum format() const;

        ALuint sample_rate() const;

        std::size_t read_data(void* dest, std::size_t length);

        void rewind();

        const std::vector<char>& decoded_data();
    };
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gosu-1.4.5 src/AudioFile.hpp
gosu-1.4.5.pre1 src/AudioFile.hpp
gosu-1.4.4 src/AudioFile.hpp
gosu-1.4.3 src/AudioFile.hpp
gosu-1.4.1 src/AudioFile.hpp
gosu-1.4.0 src/AudioFile.hpp