Mercurial > mplayer.hg
annotate libao2/ao_null.c @ 3310:21314bc5079e
framedrop extended
author | jaf |
---|---|
date | Tue, 04 Dec 2001 12:55:05 +0000 |
parents | 981a9e5118ce |
children | 561de830fdf1 |
rev | line source |
---|---|
954 | 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 | |
18 // to set/get/query special features/parameters | |
19 static int control(int cmd,int arg){ | |
20 return -1; | |
21 } | |
22 | |
23 // open & setup audio device | |
24 // return: 1=success 0=fail | |
25 static int init(int rate,int channels,int format,int flags){ | |
26 | |
3095 | 27 ao_data.outburst=4096; |
954 | 28 |
1763 | 29 return 0; |
954 | 30 } |
31 | |
32 // close audio device | |
33 static void uninit(){ | |
34 | |
35 } | |
36 | |
37 // stop playing and empty buffers (for seeking/pause) | |
38 static void reset(){ | |
39 | |
40 } | |
41 | |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
42 // stop playing, keep buffers (for pause) |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
43 static void audio_pause() |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
44 { |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
45 // for now, just call reset(); |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
46 reset(); |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
47 } |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
48 |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
49 // resume playing, after audio_pause() |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
50 static void audio_resume() |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
51 { |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
52 } |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
53 |
954 | 54 // return: how many bytes can be played without blocking |
55 static int get_space(){ | |
56 | |
3095 | 57 return ao_data.outburst; |
954 | 58 } |
59 | |
60 // plays 'len' bytes of 'data' | |
61 // it should round it down to outburst*n | |
62 // return: number of bytes played | |
63 static int play(void* data,int len,int flags){ | |
64 | |
65 return len; | |
66 } | |
67 | |
3095 | 68 // return: delay in seconds between first and last sample in buffer |
69 static float get_delay(){ | |
954 | 70 |
3095 | 71 return 0.0; |
954 | 72 } |
73 | |
74 | |
75 | |
76 | |
77 | |
78 |