]> git.vomp.tv Git - vompclient.git/blob - audiowin.h
Update for windows
[vompclient.git] / audiowin.h
1 /*\r
2     Copyright 2004-2005 Chris Tallon\r
3 \r
4     This file is part of VOMP.\r
5 \r
6     VOMP is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; either version 2 of the License, or\r
9     (at your option) any later version.\r
10 \r
11     VOMP is distributed in the hope that it will be useful,\r
12     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14     GNU General Public License for more details.\r
15 \r
16     You should have received a copy of the GNU General Public License\r
17     along with VOMP; if not, write to the Free Software\r
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 */\r
20 \r
21 #ifndef AUDIOWIN_H\r
22 #define AUDIOWIN_H\r
23 \r
24 #include "defines.h"\r
25 #include "log.h"\r
26 #include "audio.h"\r
27 \r
28 class AudioWin : public Audio\r
29 {\r
30   public:\r
31     AudioWin();\r
32     ~AudioWin();\r
33 \r
34     int init(UCHAR streamType);\r
35     int shutdown();\r
36 \r
37     int setStreamType(UCHAR streamType);\r
38     int setChannel();\r
39     int setSource();\r
40     int sync();\r
41     int play();\r
42     int stop();\r
43     int pause();\r
44     int unPause();\r
45     int reset();\r
46     int setVolume(int volume);\r
47     int mute();\r
48     int unMute();\r
49     int write(char *buf, int len);\r
50 \r
51     // Writing Data to Audiodevice\r
52     virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos);\r
53     virtual UINT DeliverMediaSample(const UCHAR* buffer, UINT *samplepos);\r
54     UINT DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, UINT *samplepos);\r
55   private:\r
56     MediaPacket mediapacket;\r
57   public:\r
58     virtual long long SetStartOffset(long long curreftime, bool *rsync);\r
59   virtual void ResetTimeOffsets();\r
60 \r
61 private:\r
62   bool firstsynched;\r
63   long winvolume;\r
64 #ifdef DEV\r
65     int test();\r
66 #endif\r
67 };\r
68 \r
69 #endif\r
70 \r