openal中的一个函数

来源:互联网 发布:程序员的数学概率统计 编辑:程序博客网 时间:2024/05/19 15:40

今天为了获取音频播放信息留意了下:

函数: 

ALint state =0;

alGetSourcei(Source, AL_SOURCE_STATE, &state);
当音频自动播放完的时候

state会由

AL_PLAYING 变更为 AL_STOPPED

其数值为:

/**
 * Source state information.
 */
#define AL_SOURCE_STATE                   0x1010
#define AL_INITIAL                                0x1011
#define AL_PLAYING                              0x1012
#define AL_PAUSED                               0x1013
#define AL_STOPPED                             0x1014

 

这样就不需要考虑播放位置了