forked from Jackarain/avplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
audio_out.h
54 lines (42 loc) · 1.65 KB
/
audio_out.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// audio_out.h
// ~~~~~~~~~~~
//
// Copyright (c) 2011 Jack ([email protected])
//
#ifndef __AUDIO_OUT_H__
#define __AUDIO_OUT_H__
#ifdef _MSC_VER
# ifdef AUDIO_EXPORTS
# define EXPORT_API __declspec(dllexport)
# else
# define EXPORT_API __declspec(dllimport)
# endif
#else
# define EXPORT_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
EXPORT_API int wave_init_audio(struct ao_context *ctx, uint32_t channels,
uint32_t bits_per_sample, uint32_t sample_rate, int format);
EXPORT_API int wave_play_audio(struct ao_context *ctx, uint8_t *data, uint32_t size);
EXPORT_API void wave_audio_control(struct ao_context *ctx, double l, double r);
EXPORT_API void wave_mute_set(struct ao_context *ctx, int s);
EXPORT_API void wave_destory_audio(struct ao_context *ctx);
EXPORT_API int dsound_init_audio(struct ao_context *ctx, uint32_t channels,
uint32_t bits_per_sample, uint32_t sample_rate, int format);
EXPORT_API int dsound_play_audio(struct ao_context *ctx, uint8_t *data, uint32_t size);
EXPORT_API void dsound_audio_control(struct ao_context *ctx, double l, double r);
EXPORT_API void dsound_mute_set(struct ao_context *ctx, int s);
EXPORT_API void dsound_destory_audio(struct ao_context *ctx);
EXPORT_API int sdl_init_audio(struct ao_context *ctx, uint32_t channels,
uint32_t bits_per_sample, uint32_t sample_rate, int format);
EXPORT_API int sdl_play_audio(struct ao_context *ctx, uint8_t *data, uint32_t size);
EXPORT_API void sdl_audio_control(struct ao_context *ctx, double l, double r);
EXPORT_API void sdl_mute_set(struct ao_context *ctx, int s);
EXPORT_API void sdl_destory_audio(struct ao_context *ctx);
#ifdef __cplusplus
}
#endif
#endif // __AUDIO_OUT_H__