Mercurial > mplayer.hg
annotate libao2/ao_null.c @ 2519:6f3fa9bc3b27
yv12 to yv12 scaler
someone who knows a bit about vo_odivx could add support for it ...
author | michael |
---|---|
date | Sun, 28 Oct 2001 18:30:59 +0000 |
parents | 6a39b29c5862 |
children | 981a9e5118ce |
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 // 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 | |
1763 | 36 return 0; |
954 | 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 | |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
49 // 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
|
50 static void audio_pause() |
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 // 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
|
53 reset(); |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
54 } |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
55 |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
56 // 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
|
57 static void audio_resume() |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
58 { |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
59 } |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1010
diff
changeset
|
60 |
954 | 61 // return: how many bytes can be played without blocking |
62 static int get_space(){ | |
63 | |
64 return ao_outburst; | |
65 } | |
66 | |
67 // plays 'len' bytes of 'data' | |
68 // it should round it down to outburst*n | |
69 // return: number of bytes played | |
70 static int play(void* data,int len,int flags){ | |
71 | |
72 return len; | |
73 } | |
74 | |
75 // return: how many unplayed bytes are in the buffer | |
76 static int get_delay(){ | |
77 | |
78 return 0; | |
79 } | |
80 | |
81 | |
82 | |
83 | |
84 | |
85 |