AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ISoundInputStream.h
    1#pragma once
    2
    3#include "AUI/IO/IInputStream.h"
    4#include "AUI/Audio/AAudioFormat.h"
    5#include "AUI/Util/Cache.h"
    6
    7class AUrl;
    8
   16public:
   17    static _<ISoundInputStream> fromUrl(const AUrl& url);
   18
   23    virtual AAudioFormat info() = 0;
   24
   25private:
   26    static constexpr size_t MAX_FILE_SIZE_TO_CACHE = 100 /* kb */ * 1024;
   27    class Cache {
   28    public:
   29        static Cache& inst();
   30
   31        static _unique<IInputStream> get(const AUrl& key);
   32
   33    private:
   34        AMap<AUrl, _<AByteBuffer>> mEntries;
   35    };
   36};
A std::map with AUI extensions.
Definition AMap.h:218
Uniform Resource Locator implementation.
Definition AUrl.h:31
Represents an input stream.
Definition IInputStream.h:26
Base interface for representing sound input streams of different formats.
Definition ISoundInputStream.h:15
virtual AAudioFormat info()=0
Get general info about sound stream.
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
Audio format descriptor.
Definition AAudioFormat.h:13