mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
OpenSLES: CloseDevice() is called at higher level, if OpenDevice() fails
- explicit initialization of static variables
This commit is contained in:
parent
1f3df900f9
commit
8ac0fb52cb
@ -75,24 +75,24 @@
|
|||||||
#define SL_ANDROID_SPEAKER_7DOT1 (SL_ANDROID_SPEAKER_5DOT1 | SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT)
|
#define SL_ANDROID_SPEAKER_7DOT1 (SL_ANDROID_SPEAKER_5DOT1 | SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT)
|
||||||
|
|
||||||
/* engine interfaces */
|
/* engine interfaces */
|
||||||
static SLObjectItf engineObject;
|
static SLObjectItf engineObject = NULL;
|
||||||
static SLEngineItf engineEngine;
|
static SLEngineItf engineEngine = NULL;
|
||||||
|
|
||||||
/* output mix interfaces */
|
/* output mix interfaces */
|
||||||
static SLObjectItf outputMixObject;
|
static SLObjectItf outputMixObject = NULL;
|
||||||
|
|
||||||
/* buffer queue player interfaces */
|
/* buffer queue player interfaces */
|
||||||
static SLObjectItf bqPlayerObject;
|
static SLObjectItf bqPlayerObject = NULL;
|
||||||
static SLPlayItf bqPlayerPlay = NULL;
|
static SLPlayItf bqPlayerPlay = NULL;
|
||||||
static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue;
|
static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue = NULL;
|
||||||
#if 0
|
#if 0
|
||||||
static SLVolumeItf bqPlayerVolume;
|
static SLVolumeItf bqPlayerVolume;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* recorder interfaces */
|
/* recorder interfaces */
|
||||||
static SLObjectItf recorderObject;
|
static SLObjectItf recorderObject = NULL;
|
||||||
static SLRecordItf recorderRecord;
|
static SLRecordItf recorderRecord = NULL;
|
||||||
static SLAndroidSimpleBufferQueueItf recorderBufferQueue;
|
static SLAndroidSimpleBufferQueueItf recorderBufferQueue = NULL;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static const char *sldevaudiorecorderstr = "SLES Audio Recorder";
|
static const char *sldevaudiorecorderstr = "SLES Audio Recorder";
|
||||||
@ -355,8 +355,6 @@ openslES_CreatePCMRecorder(_THIS)
|
|||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
|
||||||
openslES_DestroyPCMRecorder(this);
|
|
||||||
|
|
||||||
return SDL_SetError("Open device failed!");
|
return SDL_SetError("Open device failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,8 +579,6 @@ openslES_CreatePCMPlayer(_THIS)
|
|||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
|
||||||
openslES_DestroyPCMPlayer(this);
|
|
||||||
|
|
||||||
return SDL_SetError("Open device failed!");
|
return SDL_SetError("Open device failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user