multi-channel buffers
fxj_0330 <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
hello,I want to use multi-channel buffers to output 5.1 audio.But,when I want to play on back- left sound is heard from front-left and vice-versa for the back-right.I have two questions about it:
1、From 《OpenAL Programming Guide》we know that "playing a buffer using the AL_FORMAT_51CHN16 format will require 6 free hardware voices".I really want to know what does"hardware voices"mean?
2、I have implemented code as below,does it has something wrong?
template<typename T>
T *load_data(const T *data, int size)
{
size /= sizeof(T);
T *data71 = new T[size*6];
for(int i = 0;i < size;i++) {
data71[i*6 + 0] = 0; // front-left
data71[i*6 + 1] =0 ; // front-right
data71[i*6 + 2] = 0; // front-center
data71[i*6 + 3] = 0; // lfe (sub-woofer)
data71[i*6 + 4] = data[i]; // back-left
data71[i*6 + 5] = 0; // back-right
}
return data71;
}
thanks!
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal