Subversion Repositories eduke32

Rev

Rev 4074 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4074 Rev 4440
Line 26... Line 26...
26
#define _NEED_SDLMIXER
26
#define _NEED_SDLMIXER
27
#include "sdl_inc.h"
27
#include "sdl_inc.h"
28
#include "driver_sdl.h"
28
#include "driver_sdl.h"
29
#include "multivoc.h"
29
#include "multivoc.h"
30
30
-
 
31
#ifdef __ANDROID__
-
 
32
#include "duke3d.h"
-
 
33
#include "android.h"
-
 
34
#endif
-
 
35
31
enum {
36
enum {
32
   SDLErr_Warning = -2,
37
   SDLErr_Warning = -2,
33
   SDLErr_Error   = -1,
38
   SDLErr_Error   = -1,
34
   SDLErr_Ok      = 0,
39
   SDLErr_Ok      = 0,
35
   SDLErr_Uninitialised,
40
   SDLErr_Uninitialised,
Line 149... Line 154...
149
    if (Initialised) {
154
    if (Initialised) {
150
        SDLDrv_PCM_Shutdown();
155
        SDLDrv_PCM_Shutdown();
151
    }
156
    }
152
157
153
    chunksize = 512;
158
    chunksize = 512;
-
 
159
#ifdef __ANDROID__
-
 
160
    chunksize = droidinfo.audio_buffer_size;
-
 
161
#endif
154
162
155
    if (*mixrate >= 16000) chunksize *= 2;
163
    if (*mixrate >= 16000) chunksize *= 2;
156
    if (*mixrate >= 32000) chunksize *= 2;
164
    if (*mixrate >= 32000) chunksize *= 2;
157
165
158
    err = Mix_OpenAudio(*mixrate, (*samplebits == 8) ? AUDIO_U8 : AUDIO_S16SYS, *numchannels, chunksize);
166
    err = Mix_OpenAudio(*mixrate, (*samplebits == 8) ? AUDIO_U8 : AUDIO_S16SYS, *numchannels, chunksize);