struct CCL::IAudioSource

Overview

Abstract source of floating-point audio, can be implemented by decoders, generators, etc. More…

#include <iaudiosource.h>

struct IAudioSource: public CCL::IAudioContent
{
    // methods

    virtual int CCL_API read (AudioData& data, int sampleFrames) = 0;
    virtual TSamples CCL_API seek (TSamples position) = 0;
    virtual TSamples CCL_API tell () const = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;
    virtual int CCL_API getNumChannels () const = 0;
    virtual SampleRate CCL_API getSampleRate () const = 0;
    virtual TSamples CCL_API getFrameCount () const = 0;
    virtual SpeakerBitField CCL_API getSpeakerFormat () const = 0;
    IAudioContent TSeconds getDuration () const;

Detailed Documentation

Abstract source of floating-point audio, can be implemented by decoders, generators, etc.

Methods

virtual int CCL_API read (AudioData& data, int sampleFrames) = 0

Read the next block of audio.

Returns the number of samples actually read or negative value on error.

virtual TSamples CCL_API seek (TSamples position) = 0

Seek to audio frame position.

May fail if the source is not seekable.

virtual TSamples CCL_API tell () const = 0

Get current read position, in audio frames.