49 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa,
50 0x00, 0x38, 0x9b, 0x71
53 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa,
54 0x00, 0x38, 0x9b, 0x71
62 0x1 | 0x2 | 0x10 | 0x20,
64 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20,
65 0x1 | 0x2 | 0x4 | 0x8 | 0x100 | 0x200 | 0x400,
66 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20 | 0x200 | 0x400,
73 fputc((val>>8)&0xff, f);
79 fputc((val>>8)&0xff, f);
80 fputc((val>>16)&0xff, f);
81 fputc((val>>24)&0xff, f);
100 while(!data->killNow && Device->
Connected)
109 avail += ((ALuint64)1<<32)*Device->
Frequency/1000 - done;
112 if(avail-done < Device->UpdateSize)
131 for(i = 0;i < data->size;i++)
132 fputc(bytes[i], data->f);
134 else if(bytesize == 2)
136 for(i = 0;i < data->size;i++)
137 fputc(bytes[i^1], data->f);
139 else if(bytesize == 4)
141 for(i = 0;i < data->size;i++)
142 fputc(bytes[i^3], data->f);
147 fs = fwrite(data->buffer, frameSize, Device->
UpdateSize,
153 ERR(
"Error writing to file\n");
179 data = (wave_data*)
calloc(1,
sizeof(wave_data));
181 data->f = fopen(fname,
"wb");
185 ERR(
"Could not open file '%s': %s\n", fname, strerror(errno));
232 fprintf(data->f,
"RIFF");
235 fprintf(data->f,
"WAVE");
237 fprintf(data->f,
"fmt ");
262 fprintf(data->f,
"data");
267 ERR(
"Error writing header: %s\n", strerror(errno));
270 data->DataStart = ftell(data->f);
282 data->buffer =
malloc(data->size);
285 ERR(
"Buffer malloc failed\n");
290 if(data->thread ==
NULL)
318 size = ftell(data->f);
321 dataLen =
size - data->DataStart;
322 if(fseek(data->f, data->DataStart-4,
SEEK_SET) == 0)
324 if(fseek(data->f, 4,
SEEK_SET) == 0)
GLuint const GLfloat * val
static const BackendFuncs wave_funcs
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
char * strdup(const char *inStr)
static void fwrite32le(ALuint val, FILE *f)
ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
int ConfigValueExists(const char *blockName, const char *keyName)
const char * GetConfigValue(const char *blockName, const char *keyName, const char *def)
ALvoid aluHandleDisconnect(ALCdevice *device)
#define ALCdevice_Unlock(a)
static const ALubyte SUBTYPE_FLOAT[]
static const ALCchar waveDevice[]
EGLContext EGLenum EGLClientBuffer buffer
static void wave_close_playback(ALCdevice *device)
static void wave_stop_playback(ALCdevice *device)
void alc_wave_deinit(void)
ALuint StopThread(ALvoid *thread)
void SetDefaultWFXChannelOrder(ALCdevice *device)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
ALCboolean alc_wave_init(BackendFuncs *func_list)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
static ALuint WaveProc(ALvoid *ptr)
static const ALubyte SUBTYPE_PCM[]
enum DevFmtChannels FmtChans
static SDL_Thread * thread
void ALCdevice_LockDefault(ALCdevice *device)
static const ALuint channel_masks[]
static ALCboolean wave_reset_playback(ALCdevice *device)
#define ALC_INVALID_VALUE
static ALCenum wave_open_playback(ALCdevice *device, const ALCchar *deviceName)
static void fwrite16le(ALushort val, FILE *f)
void alc_wave_probe(enum DevProbe type)
ALuint BytesFromDevFmt(enum DevFmtType type)
void ALCdevice_UnlockDefault(ALCdevice *device)
ALuint ChannelsFromDevFmt(enum DevFmtChannels chans)
#define ALCdevice_Lock(a)
static ALCboolean wave_start_playback(ALCdevice *device)
void AppendAllDevicesList(const ALCchar *name)
ALvoid * StartThread(ALuint(*func)(ALvoid *), ALvoid *ptr)
static __inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type)