]> git.vomp.tv Git - vompclient.git/blob - audiowin.cc
Windows port
[vompclient.git] / audiowin.cc
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 #include "audiowin.h"
22
23 AudioWin::AudioWin()
24 {
25   if (instance) return;
26   initted = 0;
27 }
28
29 AudioWin::~AudioWin()
30 {
31 }
32
33 int AudioWin::init(UCHAR tstreamType)
34 {
35   if (initted) return 0;
36   initted = 1;
37   return 1;
38 }
39
40 int AudioWin::shutdown()
41 {
42   if (!initted) return 0;
43   initted = 0;
44   return 1;
45 }
46
47 int AudioWin::getFD()
48 {
49   return 0;
50 }
51
52 int AudioWin::write(char *buf, int len)
53 {
54   return 0; //write(fdAudio, buf, len);
55 }
56
57 int AudioWin::setStreamType(UCHAR type)
58 {
59   if (!initted) return 0;
60   return 1;
61 }
62
63 int AudioWin::setChannel()
64 {
65   if (!initted) return 0;
66   return 1;
67 }
68
69 int AudioWin::setSource()
70 {
71   if (!initted) return 0;
72   return 1;
73 }
74
75 int AudioWin::sync()
76 {
77   if (!initted) return 0;
78   return 1;
79 }
80
81 int AudioWin::play()
82 {
83   if (!initted) return 0;
84   return 1;
85 }
86
87 int AudioWin::stop()
88 {
89   if (!initted) return 0;
90   return 1;
91 }
92
93 int AudioWin::pause()
94 {
95   if (!initted) return 0;
96   return 1;
97 }
98
99 int AudioWin::unPause()
100 {
101   if (!initted) return 0;
102   return 1;
103 }
104
105 int AudioWin::reset()
106 {
107   if (!initted) return 0;
108   return 1;
109 }
110
111 int AudioWin::setVolume(int tvolume)
112 {
113   // parameter: 0 for silence, 20 for full
114   if ((tvolume < 0) || (tvolume > 20)) return 0;
115   return 1;
116 }
117
118 int AudioWin::mute()
119 {
120   if (!initted) return 0;
121   return 1;
122 }
123
124 int AudioWin::unMute()
125 {
126   if (!initted) return 0;
127   return 1;
128 }
129
130 #ifdef DEV
131 int AudioWin::test()
132 {
133   return 0;
134 }
135 #endif