9 #ifndef NDL_DIRECTMEDIA_API_VERSION
10 # define NDL_DIRECTMEDIA_API_VERSION 1
11 #elif (NDL_DIRECTMEDIA_API_VERSION != 1)
12 # error "this header requires NDL_DIRECTMEDIA_API_VERSION 1"
15 #include "NDL_directmedia_common.h"
17 static inline __attribute__((__const__)) NDL_DIRECTAUDIO_SAMPLING_FREQ NDL_DIRECTAUDIO_SAMPLING_FREQ_OF(
int hertz) {
20 return NDL_DIRECTAUDIO_SAMPLING_FREQ_4_KHZ;
22 return NDL_DIRECTAUDIO_SAMPLING_FREQ_8_KHZ;
24 return NDL_DIRECTAUDIO_SAMPLING_FREQ_11_025KHZ;
26 return NDL_DIRECTAUDIO_SAMPLING_FREQ_12_KHZ;
28 return NDL_DIRECTAUDIO_SAMPLING_FREQ_16_KHZ;
30 return NDL_DIRECTAUDIO_SAMPLING_FREQ_22_05KHZ;
32 return NDL_DIRECTAUDIO_SAMPLING_FREQ_24_KHZ;
34 return NDL_DIRECTAUDIO_SAMPLING_FREQ_32_KHZ;
36 return NDL_DIRECTAUDIO_SAMPLING_FREQ_44_1KHZ;
38 return NDL_DIRECTAUDIO_SAMPLING_FREQ_48_KHZ;
40 return NDL_DIRECTAUDIO_SAMPLING_FREQ_64_KHZ;
42 return NDL_DIRECTAUDIO_SAMPLING_FREQ_NONE;
46 typedef void (*NDLVideoPlayCallback)(
unsigned long long);
57 int NDL_DirectAudioClose(
void);
66 int NDL_DirectAudioPlay(
void *buffer,
unsigned int size);
71 int NDL_DirectAudioResume(
void);
76 int NDL_DirectAudioPause(
void);
83 int NDL_DirectAudioCheckBufferSize(
unsigned int *remain);
93 int NDL_DirectVideoClose(
void);
102 int NDL_DirectVideoPlay(
void *buffer,
unsigned int size);
107 int NDL_DirectVideoStop(
void);
112 int NDL_DirectVideoSetCallback(NDLVideoPlayCallback cb);
117 int NDL_DirectVideoPlayWithCallback(
const void *buffer,
unsigned int size,
unsigned long long userdata);
Definition: NDL_directmedia_types.h:78
Definition: NDL_directmedia_types.h:91