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