Mercurial > mplayer.hg
comparison libao2/ao_null.c @ 954:db20b90dd34d
audio out drivers
author | arpi_esp |
---|---|
date | Sat, 02 Jun 2001 23:25:43 +0000 |
parents | |
children | 6d3a6d42c831 |
comparison
equal
deleted
inserted
replaced
953:829c68d63262 | 954:db20b90dd34d |
---|---|
1 #include <stdio.h> | |
2 #include <stdlib.h> | |
3 | |
4 #include "audio_out.h" | |
5 #include "audio_out_internal.h" | |
6 | |
7 static ao_info_t info = | |
8 { | |
9 "Null audio output", | |
10 "null", | |
11 "A'rpi", | |
12 "" | |
13 }; | |
14 | |
15 LIBAO_EXTERN(null) | |
16 | |
17 // there are some globals: | |
18 // ao_samplerate | |
19 // ao_channels | |
20 // ao_format | |
21 // ao_bps | |
22 // ao_outburst | |
23 // ao_buffersize | |
24 | |
25 // to set/get/query special features/parameters | |
26 static int control(int cmd,int arg){ | |
27 return -1; | |
28 } | |
29 | |
30 // open & setup audio device | |
31 // return: 1=success 0=fail | |
32 static int init(int rate,int channels,int format,int flags){ | |
33 | |
34 ao_outburst=4096; | |
35 | |
36 return 0; | |
37 } | |
38 | |
39 // close audio device | |
40 static void uninit(){ | |
41 | |
42 } | |
43 | |
44 // stop playing and empty buffers (for seeking/pause) | |
45 static void reset(){ | |
46 | |
47 } | |
48 | |
49 // return: how many bytes can be played without blocking | |
50 static int get_space(){ | |
51 | |
52 return ao_outburst; | |
53 } | |
54 | |
55 // plays 'len' bytes of 'data' | |
56 // it should round it down to outburst*n | |
57 // return: number of bytes played | |
58 static int play(void* data,int len,int flags){ | |
59 | |
60 return len; | |
61 } | |
62 | |
63 // return: how many unplayed bytes are in the buffer | |
64 static int get_delay(){ | |
65 | |
66 return 0; | |
67 } | |
68 | |
69 | |
70 | |
71 | |
72 | |
73 |