I don't understand how I can play sound with OpenAL library. I write program for VoIP. I'm getting every 10ms sound buffer.
size_t len = socket.read_some(boost::asio::buffer(buf),error);
buf is
boost::array <char, 441> buf;
And that I need to do with this buffer? I was reading examples, but didn't understand :(. Please help me. P.S. I use C++ on Visual Studio 2010. After editing
alGenSources(1, &alSource);
alGenBuffers(1, &alSampleSet);
alBufferData(alSampleSet, AL_FORMAT_MONO16, buf.data(), sizeof(buf.data()), 44100);
alSourcei(alSource, AL_BUFFER, alSampleSet);
//
alSourcei(alSource, AL_LOOPING, alSampleSet);
alSourcePlay(alSource);