Remove the unused flags parameter from alBufferCallbackSOFT
This commit is contained in:
parent
872c206deb
commit
a731e042cc
@ -1584,7 +1584,7 @@ END_API_FUNC
|
|||||||
|
|
||||||
|
|
||||||
AL_API void AL_APIENTRY alBufferCallbackSOFT(ALuint buffer, ALenum format, ALsizei freq,
|
AL_API void AL_APIENTRY alBufferCallbackSOFT(ALuint buffer, ALenum format, ALsizei freq,
|
||||||
ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr, ALbitfieldSOFT flags)
|
ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr)
|
||||||
START_API_FUNC
|
START_API_FUNC
|
||||||
{
|
{
|
||||||
ContextRef context{GetContextRef()};
|
ContextRef context{GetContextRef()};
|
||||||
@ -1600,8 +1600,6 @@ START_API_FUNC
|
|||||||
context->setError(AL_INVALID_VALUE, "Invalid sample rate %d", freq);
|
context->setError(AL_INVALID_VALUE, "Invalid sample rate %d", freq);
|
||||||
else if UNLIKELY(callback == nullptr)
|
else if UNLIKELY(callback == nullptr)
|
||||||
context->setError(AL_INVALID_VALUE, "NULL callback");
|
context->setError(AL_INVALID_VALUE, "NULL callback");
|
||||||
else if UNLIKELY(flags != 0)
|
|
||||||
context->setError(AL_INVALID_VALUE, "Invalid callback flags 0x%x", flags);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto usrfmt = DecomposeUserFormat(format);
|
auto usrfmt = DecomposeUserFormat(format);
|
||||||
|
@ -33,12 +33,12 @@ AL_API void AL_APIENTRY alFlushMappedBufferSOFT(ALuint buffer, ALsizei offset, A
|
|||||||
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
||||||
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
||||||
typedef ALsizei (AL_APIENTRY*ALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numbytes);
|
typedef ALsizei (AL_APIENTRY*ALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numbytes);
|
||||||
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr, ALbitfieldSOFT flags);
|
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
||||||
#ifdef AL_ALEXT_PROTOTYPES
|
#ifdef AL_ALEXT_PROTOTYPES
|
||||||
AL_API void AL_APIENTRY alBufferCallbackSOFT(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr, ALbitfieldSOFT flags);
|
AL_API void AL_APIENTRY alBufferCallbackSOFT(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr);
|
||||||
AL_API void AL_APIENTRY alGetBufferPtrSOFT(ALuint buffer, ALenum param, ALvoid **ptr);
|
AL_API void AL_APIENTRY alGetBufferPtrSOFT(ALuint buffer, ALenum param, ALvoid **ptr);
|
||||||
AL_API void AL_APIENTRY alGetBuffer3PtrSOFT(ALuint buffer, ALenum param, ALvoid **ptr0, ALvoid **ptr1, ALvoid **ptr2);
|
AL_API void AL_APIENTRY alGetBuffer3PtrSOFT(ALuint buffer, ALenum param, ALvoid **ptr0, ALvoid **ptr1, ALvoid **ptr2);
|
||||||
AL_API void AL_APIENTRY alGetBufferPtrvSOFT(ALuint buffer, ALenum param, ALvoid **ptr);
|
AL_API void AL_APIENTRY alGetBufferPtrvSOFT(ALuint buffer, ALenum param, ALvoid **ptr);
|
||||||
|
@ -78,11 +78,10 @@ extern "C" {
|
|||||||
#ifdef ALLOW_EXPERIMENTAL_EXTS
|
#ifdef ALLOW_EXPERIMENTAL_EXTS
|
||||||
#ifndef AL_SOFT_callback_buffer
|
#ifndef AL_SOFT_callback_buffer
|
||||||
#define AL_SOFT_callback_buffer
|
#define AL_SOFT_callback_buffer
|
||||||
typedef unsigned int ALbitfieldSOFT;
|
|
||||||
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
||||||
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
||||||
typedef ALsizei (AL_APIENTRY*ALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numbytes);
|
typedef ALsizei (AL_APIENTRY*ALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numbytes);
|
||||||
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr, ALbitfieldSOFT flags);
|
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
||||||
@ -1282,8 +1281,7 @@ int AudioState::handler()
|
|||||||
bool callback_ok{false};
|
bool callback_ok{false};
|
||||||
if(alBufferCallbackSOFT)
|
if(alBufferCallbackSOFT)
|
||||||
{
|
{
|
||||||
alBufferCallbackSOFT(mBuffers[0], mFormat, mCodecCtx->sample_rate, bufferCallbackC, this,
|
alBufferCallbackSOFT(mBuffers[0], mFormat, mCodecCtx->sample_rate, bufferCallbackC, this);
|
||||||
0);
|
|
||||||
alSourcei(mSource, AL_BUFFER, static_cast<ALint>(mBuffers[0]));
|
alSourcei(mSource, AL_BUFFER, static_cast<ALint>(mBuffers[0]));
|
||||||
if(alGetError() != AL_NO_ERROR)
|
if(alGetError() != AL_NO_ERROR)
|
||||||
{
|
{
|
||||||
|
@ -47,11 +47,10 @@
|
|||||||
|
|
||||||
#ifndef AL_SOFT_callback_buffer
|
#ifndef AL_SOFT_callback_buffer
|
||||||
#define AL_SOFT_callback_buffer
|
#define AL_SOFT_callback_buffer
|
||||||
typedef unsigned int ALbitfieldSOFT;
|
|
||||||
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
#define AL_BUFFER_CALLBACK_FUNCTION_SOFT 0x19A0
|
||||||
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
#define AL_BUFFER_CALLBACK_USER_PARAM_SOFT 0x19A1
|
||||||
typedef ALsizei (AL_APIENTRY*LPALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numsamples);
|
typedef ALsizei (AL_APIENTRY*LPALBUFFERCALLBACKTYPESOFT)(ALvoid *userptr, ALvoid *sampledata, ALsizei numsamples);
|
||||||
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, LPALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr, ALbitfieldSOFT flags);
|
typedef void (AL_APIENTRY*LPALBUFFERCALLBACKSOFT)(ALuint buffer, ALenum format, ALsizei freq, LPALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRSOFT)(ALuint buffer, ALenum param, ALvoid **value);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
typedef void (AL_APIENTRY*LPALGETBUFFER3PTRSOFT)(ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3);
|
||||||
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
typedef void (AL_APIENTRY*LPALGETBUFFERPTRVSOFT)(ALuint buffer, ALenum param, ALvoid **values);
|
||||||
@ -219,7 +218,7 @@ struct StreamPlayer {
|
|||||||
|
|
||||||
bool prepare()
|
bool prepare()
|
||||||
{
|
{
|
||||||
alBufferCallbackSOFT(mBuffer, mFormat, mSfInfo.samplerate, bufferCallbackC, this, 0);
|
alBufferCallbackSOFT(mBuffer, mFormat, mSfInfo.samplerate, bufferCallbackC, this);
|
||||||
alSourcei(mSource, AL_BUFFER, static_cast<ALint>(mBuffer));
|
alSourcei(mSource, AL_BUFFER, static_cast<ALint>(mBuffer));
|
||||||
if(ALenum err{alGetError()})
|
if(ALenum err{alGetError()})
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user