aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c4
-rw-r--r--Alc/alsa.c10
-rw-r--r--Alc/dsound.c10
-rw-r--r--Alc/oss.c10
-rw-r--r--Alc/portaudio.c10
-rw-r--r--Alc/pulseaudio.c10
-rw-r--r--Alc/solaris.c10
-rw-r--r--Alc/wave.c10
-rw-r--r--OpenAL32/Include/alMain.h8
9 files changed, 34 insertions, 48 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0202f60a..14fb3971 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1213,7 +1213,7 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint
bs2b_set_level(device->Bs2b, device->Bs2bLevel);
}
- if(ALCdevice_StartContext(device, ALContext) == ALC_FALSE)
+ if(ALCdevice_ResetPlayback(device) == ALC_FALSE)
{
alcDestroyContext(ALContext);
ALContext = NULL;
@@ -1248,7 +1248,7 @@ ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context)
if (IsContext(context))
{
- ALCdevice_StopContext(context->Device, context);
+ ALCdevice_StopPlayback(context->Device);
// Lock context
SuspendContext(context);
diff --git a/Alc/alsa.c b/Alc/alsa.c
index ec80973a..e96e185f 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -408,7 +408,7 @@ static void alsa_close_playback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean alsa_start_context(ALCdevice *device, ALCcontext *context)
+static ALCboolean alsa_reset_playback(ALCdevice *device)
{
alsa_data *data = (alsa_data*)device->ExtraData;
snd_pcm_uframes_t bufferSizeInFrames;
@@ -420,7 +420,6 @@ static ALCboolean alsa_start_context(ALCdevice *device, ALCcontext *context)
int allowmmap;
char *err;
int i;
- (void)context;
switch(aluBytesFromFormat(device->Format))
@@ -544,10 +543,9 @@ static ALCboolean alsa_start_context(ALCdevice *device, ALCcontext *context)
return ALC_TRUE;
}
-static void alsa_stop_context(ALCdevice *device, ALCcontext *context)
+static void alsa_stop_playback(ALCdevice *device)
{
alsa_data *data = (alsa_data*)device->ExtraData;
- (void)context;
if(!data->thread)
return;
@@ -763,8 +761,8 @@ static ALCuint alsa_available_samples(ALCdevice *pDevice)
BackendFuncs alsa_funcs = {
alsa_open_playback,
alsa_close_playback,
- alsa_start_context,
- alsa_stop_context,
+ alsa_reset_playback,
+ alsa_stop_playback,
alsa_open_capture,
alsa_close_capture,
alsa_start_capture,
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 8501623d..e4436258 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -214,7 +214,7 @@ static void DSoundClosePlayback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean DSoundStartContext(ALCdevice *device, ALCcontext *context)
+static ALCboolean DSoundResetPlayback(ALCdevice *device)
{
DSoundData *pData = (DSoundData*)device->ExtraData;
DSBUFFERDESC DSBDescription;
@@ -223,7 +223,6 @@ static ALCboolean DSoundStartContext(ALCdevice *device, ALCcontext *context)
ALenum format = 0;
DWORD speakers;
HRESULT hr;
- (void)context;
memset(&OutputType, 0, sizeof(OutputType));
@@ -381,10 +380,9 @@ static ALCboolean DSoundStartContext(ALCdevice *device, ALCcontext *context)
return ALC_TRUE;
}
-static void DSoundStopContext(ALCdevice *device, ALCcontext *context)
+static void DSoundStopPlayback(ALCdevice *device)
{
DSoundData *pData = device->ExtraData;
- (void)context;
if(!pData->thread)
return;
@@ -440,8 +438,8 @@ static ALCuint DSoundAvailableSamples(ALCdevice *pDevice)
BackendFuncs DSoundFuncs = {
DSoundOpenPlayback,
DSoundClosePlayback,
- DSoundStartContext,
- DSoundStopContext,
+ DSoundResetPlayback,
+ DSoundStopPlayback,
DSoundOpenCapture,
DSoundCloseCapture,
DSoundStartCapture,
diff --git a/Alc/oss.c b/Alc/oss.c
index bfad2237..7af734ae 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -183,7 +183,7 @@ static void oss_close_playback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean oss_start_context(ALCdevice *device, ALCcontext *context)
+static ALCboolean oss_reset_playback(ALCdevice *device)
{
oss_data *data = (oss_data*)device->ExtraData;
int numFragmentsLogSize;
@@ -196,7 +196,6 @@ static ALCboolean oss_start_context(ALCdevice *device, ALCcontext *context)
int ossSpeed;
char *err;
int i;
- (void)context;
switch(aluBytesFromFormat(device->Format))
{
@@ -278,10 +277,9 @@ static ALCboolean oss_start_context(ALCdevice *device, ALCcontext *context)
return ALC_TRUE;
}
-static void oss_stop_context(ALCdevice *device, ALCcontext *context)
+static void oss_stop_playback(ALCdevice *device)
{
oss_data *data = (oss_data*)device->ExtraData;
- (void)context;
if(!data->thread)
return;
@@ -455,8 +453,8 @@ static ALCuint oss_available_samples(ALCdevice *pDevice)
BackendFuncs oss_funcs = {
oss_open_playback,
oss_close_playback,
- oss_start_context,
- oss_stop_context,
+ oss_reset_playback,
+ oss_stop_playback,
oss_open_capture,
oss_close_capture,
oss_start_capture,
diff --git a/Alc/portaudio.c b/Alc/portaudio.c
index 875b01ee..50039286 100644
--- a/Alc/portaudio.c
+++ b/Alc/portaudio.c
@@ -160,7 +160,7 @@ static void pa_close_playback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean pa_start_context(ALCdevice *device, ALCcontext *context)
+static ALCboolean pa_reset_playback(ALCdevice *device)
{
pa_data *data = (pa_data*)device->ExtraData;
const PaStreamInfo *streamInfo;
@@ -169,13 +169,11 @@ static ALCboolean pa_start_context(ALCdevice *device, ALCcontext *context)
device->Frequency = streamInfo->sampleRate;
return ALC_TRUE;
- (void)context;
}
-static void pa_stop_context(ALCdevice *device, ALCcontext *context)
+static void pa_stop_playback(ALCdevice *device)
{
(void)device;
- (void)context;
}
@@ -191,8 +189,8 @@ static ALCboolean pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
static const BackendFuncs pa_funcs = {
pa_open_playback,
pa_close_playback,
- pa_start_context,
- pa_stop_context,
+ pa_reset_playback,
+ pa_stop_playback,
pa_open_capture,
NULL,
NULL,
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 76e0ef60..c5453344 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -336,10 +336,9 @@ static void pulse_close_playback(ALCdevice *device) //{{{
pulse_close(device);
} //}}}
-static ALCboolean pulse_start_context(ALCdevice *device, ALCcontext *context) //{{{
+static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{
{
pulse_data *data = device->ExtraData;
- (void)context;
ppa_threaded_mainloop_lock(data->loop);
@@ -430,10 +429,9 @@ static ALCboolean pulse_start_context(ALCdevice *device, ALCcontext *context) //
return ALC_TRUE;
} //}}}
-static void pulse_stop_context(ALCdevice *device, ALCcontext *context) //{{{
+static void pulse_stop_playback(ALCdevice *device) //{{{
{
pulse_data *data = device->ExtraData;
- (void)context;
if(!data->stream)
return;
@@ -614,8 +612,8 @@ static ALCuint pulse_available_samples(ALCdevice *device) //{{{
BackendFuncs pulse_funcs = { //{{{
pulse_open_playback,
pulse_close_playback,
- pulse_start_context,
- pulse_stop_context,
+ pulse_reset_playback,
+ pulse_stop_playback,
pulse_open_capture,
pulse_close_capture,
pulse_start_capture,
diff --git a/Alc/solaris.c b/Alc/solaris.c
index b0c0adf4..5cc9e201 100644
--- a/Alc/solaris.c
+++ b/Alc/solaris.c
@@ -128,13 +128,12 @@ static void solaris_close_playback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean solaris_start_context(ALCdevice *device, ALCcontext *context)
+static ALCboolean solaris_reset_playback(ALCdevice *device)
{
solaris_data *data = (solaris_data*)device->ExtraData;
audio_info_t info;
ALuint frameSize;
int numChannels;
- (void)context;
AUDIO_INITINFO(&info);
@@ -206,10 +205,9 @@ static ALCboolean solaris_start_context(ALCdevice *device, ALCcontext *context)
return ALC_TRUE;
}
-static void solaris_stop_context(ALCdevice *device, ALCcontext *context)
+static void solaris_stop_playback(ALCdevice *device)
{
solaris_data *data = (solaris_data*)device->ExtraData;
- (void)context;
if(!data->thread)
return;
@@ -265,8 +263,8 @@ static ALCuint solaris_available_samples(ALCdevice *pDevice)
BackendFuncs solaris_funcs = {
solaris_open_playback,
solaris_close_playback,
- solaris_start_context,
- solaris_stop_context,
+ solaris_reset_playback,
+ solaris_stop_playback,
solaris_open_capture,
solaris_close_capture,
solaris_start_capture,
diff --git a/Alc/wave.c b/Alc/wave.c
index 24b2faad..958144a4 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -140,11 +140,10 @@ static void wave_close_playback(ALCdevice *device)
device->ExtraData = NULL;
}
-static ALCboolean wave_start_context(ALCdevice *device, ALCcontext *Context)
+static ALCboolean wave_reset_playback(ALCdevice *device)
{
wave_data *data = (wave_data*)device->ExtraData;
ALuint channels, bits, i;
- (void)Context;
fseek(data->f, 0, SEEK_SET);
clearerr(data->f);
@@ -241,12 +240,11 @@ static ALCboolean wave_start_context(ALCdevice *device, ALCcontext *Context)
return ALC_TRUE;
}
-static void wave_stop_context(ALCdevice *device, ALCcontext *Context)
+static void wave_stop_playback(ALCdevice *device)
{
wave_data *data = (wave_data*)device->ExtraData;
ALuint dataLen;
long size;
- (void)Context;
if(!data->thread)
return;
@@ -320,8 +318,8 @@ static ALCuint wave_available_samples(ALCdevice *pDevice)
BackendFuncs wave_funcs = {
wave_open_playback,
wave_close_playback,
- wave_start_context,
- wave_stop_context,
+ wave_reset_playback,
+ wave_stop_playback,
wave_open_capture,
wave_close_capture,
wave_start_capture,
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 3205e467..a7fdb6ee 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -160,8 +160,8 @@ static __inline void al_print(const char *fname, unsigned int line, const char *
typedef struct {
ALCboolean (*OpenPlayback)(ALCdevice*, const ALCchar*);
void (*ClosePlayback)(ALCdevice*);
- ALCboolean (*StartContext)(ALCdevice*, ALCcontext*);
- void (*StopContext)(ALCdevice*, ALCcontext*);
+ ALCboolean (*ResetPlayback)(ALCdevice*);
+ void (*StopPlayback)(ALCdevice*);
ALCboolean (*OpenCapture)(ALCdevice*, const ALCchar*);
void (*CloseCapture)(ALCdevice*);
@@ -255,8 +255,8 @@ struct ALCdevice_struct
#define ALCdevice_OpenPlayback(a,b) ((a)->Funcs->OpenPlayback((a), (b)))
#define ALCdevice_ClosePlayback(a) ((a)->Funcs->ClosePlayback((a)))
-#define ALCdevice_StartContext(a,b) ((a)->Funcs->StartContext((a), (b)))
-#define ALCdevice_StopContext(a,b) ((a)->Funcs->StopContext((a), (b)))
+#define ALCdevice_ResetPlayback(a) ((a)->Funcs->ResetPlayback((a)))
+#define ALCdevice_StopPlayback(a) ((a)->Funcs->StopPlayback((a)))
#define ALCdevice_OpenCapture(a,b) ((a)->Funcs->OpenCapture((a), (b)))
#define ALCdevice_CloseCapture(a) ((a)->Funcs->CloseCapture((a)))
#define ALCdevice_StartCapture(a) ((a)->Funcs->StartCapture((a)))