# irrklang::IAudioStream Class Reference

Reads and decodes audio data into an usable audio stream for the ISoundEngine. More...

`#include <ik_IAudioStream.h>`

Inheritance diagram for irrklang::IAudioStream:

List of all members.

## Public Member Functions
virtual | ~IAudioStream ()
| destructor
virtual SAudioStreamFormat | getFormat ()=0
| returns format of the audio stream
virtual bool | setPosition (ik_s32 pos)=0
| sets the position of the audio stream.
virtual bool | getIsSeekingSupported ()
| returns true if the audio stream is seekable
virtual ik_s32 | readFrames (void *target, ik_s32 frameCountToRead)=0
| tells the audio stream to read frameCountToRead audio frames into the specified buffer

## Detailed Description

Reads and decodes audio data into an usable audio stream for the ISoundEngine.

## Constructor & Destructor Documentation

virtual irrklang::IAudioStream::~IAudioStream | ( |  | ) | `[inline, virtual]`

destructor

## Member Function Documentation

virtual SAudioStreamFormat irrklang::IAudioStream::getFormat | ( |  | ) | `[pure virtual]`

returns format of the audio stream

virtual bool irrklang::IAudioStream::getIsSeekingSupported | ( |  | ) | `[inline, virtual]`

returns true if the audio stream is seekable

virtual ik_s32 irrklang::IAudioStream::readFrames | ( | void * | target,
|  | ik_s32 | frameCountToRead |
| ) |  |  | `[pure virtual]`

tells the audio stream to read frameCountToRead audio frames into the specified buffer

Parameters:

  | target,: | Target data buffer to the method will write the read frames into. The specified buffer will be at least getFormat().getFrameSize()*frameCountToRead bytes big.
  | frameCountToRead,: | amount of frames to be read.

Returns:
  Returns amount of frames really read. Should be frameCountToRead in most cases.

virtual bool irrklang::IAudioStream::setPosition | ( | ik_s32 | pos | ) | `[pure virtual]`

sets the position of the audio stream.

For example to let the stream be read from the beginning of the file again, setPosition(0) would be called. This is usually done be the sound engine to loop a stream after if has reached the end. Return true if sucessful and 0 if not.

Parameters:

  | pos,: | Position in frames.

The documentation for this class was generated from the following file:

- ik_IAudioStream.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

| The irrKlang Engine Documentation © 2003-2018 by Nikolaus Gebhardt. Generated by Doxygen (1.6.1)