nCine 2022.04.r504-20bd01e
A cross-platform 2D game engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
ncine::AudioStream Class Reference

Audio stream class. More...

#include <AudioStream.h>

Public Member Functions

unsigned int bufferId () const
 Returns the OpenAL id of the currently playing buffer, or 0 if not.
 
int bytesPerSample () const
 Returns the number of bytes per sample.
 
int numChannels () const
 Returns the number of audio channels.
 
int frequency () const
 Returns the samples frequency.
 
unsigned long int numSamples () const
 Returns number of samples.
 
float duration () const
 Returns the duration in seconds.
 
unsigned long bufferSize () const
 Returns the size of the loaded buffer in bytes.
 
unsigned long int numSamplesInStreamBuffer () const
 Returns the number of samples in the streaming buffer.
 
int streamBufferSize () const
 Returns the size of the streaming buffer in bytes.
 
unsigned int totalProcessedBuffers () const
 Returns the number of processed buffers since first enqueue.
 
bool enqueue (unsigned int source, bool looping)
 Enqueues new buffers and unqueues processed ones.
 
void stop (unsigned int source)
 Unqueues any left buffer and rewinds the loader.
 

Friends

class AudioStreamPlayer
 

Detailed Description

Audio stream class.

Member Function Documentation

◆ enqueue()

bool ncine::AudioStream::enqueue ( unsigned int  source,
bool  looping 
)

Enqueues new buffers and unqueues processed ones.

Returns
A flag indicating whether the stream has been entirely decoded and played or not.

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