Files
kraken/KREngine/kraken/KRAudioBuffer.h
Kearwood Gilbert 743955fbe0 Siren audio engine in progress
Added HRTF (Kemar) samples for 3d spatialization
Exposed frame buffer width and height for camera renderFrame calls.
Fixed a bug that caused objects containing a mixture of both opaque and transparent materials to be rendered entirely in the transparent render pass.  Now the sub meshes are evaluated independently.
2013-02-08 17:28:17 -08:00

47 lines
1.0 KiB
C++

//
// KRAudioBuffer.h
// KREngine
//
// Created by Kearwood Gilbert on 2013-01-04.
// Copyright (c) 2013 Kearwood Software. All rights reserved.
//
#ifndef KRAUDIO_BUFFER_H
#define KRAUDIO_BUFFER_H
#include "KREngine-common.h"
#include "KRDataBlock.h"
class KRAudioManager;
class KRAudioSample;
class KRAudioBuffer
{
public:
KRAudioBuffer(KRAudioManager *manager, KRAudioSample *sound, int index, ALenum dataFormat, int frameCount, int frameRate, int bytesPerFrame, void (*fn_populate)(KRAudioSample *, int, void *));
~KRAudioBuffer();
unsigned int getBufferID();
int getFrameCount();
int getFrameRate();
signed short *getFrameData();
KRAudioSample *getAudioSample();
int getIndex();
private:
KRAudioManager *m_pSoundManager;
int m_index;
ALenum m_dataFormat;
int m_frameCount;
int m_frameRate;
int m_bytesPerFrame;
KRDataBlock *m_pData;
unsigned int m_bufferID;
KRAudioSample *m_audioSample;
};
#endif /* defined(KRAUDIO_BUFFER_H) */