summaryrefslogtreecommitdiffstats
path: root/DOCS/tech/general.txt
diff options
context:
space:
mode:
authorgabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 08:06:20 +0000
committergabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-04 08:06:20 +0000
commit7a5009d9eda392c724b5b165f1c3b16e2dc27aa8 (patch)
treeb57d227ef5c105b42ec75195ab1e6afcd3ff69c5 /DOCS/tech/general.txt
parent7c9714156ac071cb2e00c2d6e9ff55147da196b6 (diff)
downloadmpv-7a5009d9eda392c724b5b165f1c3b16e2dc27aa8.tar.bz2
mpv-7a5009d9eda392c724b5b165f1c3b16e2dc27aa8.tar.xz
commitus interruptus
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@987 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS/tech/general.txt')
-rw-r--r--DOCS/tech/general.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/DOCS/tech/general.txt b/DOCS/tech/general.txt
index ff32fe7825..90bd695220 100644
--- a/DOCS/tech/general.txt
+++ b/DOCS/tech/general.txt
@@ -232,4 +232,47 @@ Now, go on:
flip_page(): this is called after each frame, this diplays the buffer for
real. This is 'swapbuffers' when double-buffering.
+6. libao2: this control audio playing
+
+ As in libvo (see 5.) also here are some drivers, based on the same API:
+
+statis int control(int cmd, int arg);
+ This is for reading/setting driver-specific and other special parameters.
+ Not really used for now.
+
+static int init(int rate,int channels,int format,int flags);
+ The init of driver, opens device, sets sample rate, channels, sample format
+ parameters.
+ Sample format: usually AFMT_S16_LE or AFMT_U8, for more definitions see
+ dec_audio.c and linux/soundcards.h files!
+
+static void uninit();
+ Guess what.
+ Ok I help: closes the device, not (yet) called when exit.
+
+statis void reset();
+ Resets device. To be exact, it's for deleting buffers' contents,
+ so after reset() the previously received stuff won't be output.
+ (called if pause or seek)
+
+static int get_space();
+ Returns how many bytes can be written into the audio buffer without
+ blocking (making caller process wait). If the buffer is (nearly) full,
+ has to return 0!
+ If it never gives 0, MPlayer won't work!
+
+static int play(void* data,int len,int flags);
+ Plays a bit of audio, which is received throught the "data" memory area, with
+ a size of "len". The "flags" isn't used yet. It has to copy the data, because
+ they can be overwritten after the call is made. Doesn't really have to use
+ all the bytes, it has to give back how many have been used (copied to
+ buffer).
+
+static int get_delay();
+ Has to return how many bytes are in the audio buffer. Be exact, if possible,
+ since the whole timing depends on this! In the worst case, return the size
+ of the buffer.
+
+!!! Because the video is synchronized to the audio (card), it's very important
+!!! that the get_space and get_delay are working!