Android NDK Game Development Cookbook by Unknown

Android NDK Game Development Cookbook by Unknown

Author:Unknown
Language: eng
Format: mobi
Publisher: Packt Publishing


In the Update() method, we use the StreamBuffer() member function, which does the job of filling the buffer with decoded or generated data from the provider: int StreamBuffer( unsigned int BufferID, int Size ) { int ActualSize = FWaveDataProvider->StreamWaveData(Size); ubyte* Data = FWaveDataProvider->GetWaveData(); int Sz = (int)FWaveDataProvider->GetWaveDataSize(); alBufferData( BufferID, FWaveDataProvider->GetALFormat(), Data, Sz, FWaveDataProvider->FSamplesPerSec ); return ActualSize; }

The BUFFER_SIZE constant is set to be big enough to hold the data for a couple of seconds of streamed data:const int BUFFER_SIZE = 352800;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.