2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
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.
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.
16 You should have received a copy of the GNU General Public License
17 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
28 #include "dssourcefilter.h"
32 struct AudioFilterDesc {
36 typedef std::vector<AudioFilterDesc> AudioFilterDescList;
38 class AudioWin : public Audio
44 int init(UCHAR streamType);
47 int setStreamType(UCHAR streamType);
56 int setVolume(int volume);
59 int write(char *buf, int len);
61 bool loadOptionsFromServer(VDR* vdr);
62 bool saveOptionstoServer();
63 bool addOptionPagesToWTB(WTabBar *wtb);
65 // Writing Data to Audiodevice
66 virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos);
67 virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos);
68 UINT DeliverMediaPacket(MediaPacket packet, UCHAR* buffer, UINT *samplepos);
70 int dsInitAudioFilter(IGraphBuilder* dsgraphbuilder);
71 const AudioFilterDescList *getAudioFilterList(int &selected);
72 bool selectAudioFilter(int filter);
74 const AudioFilterDescList *getMp3AudioFilterList(int &selected);
75 bool selectMp3AudioFilter(int filter);
77 virtual bool supportsAc3();
78 virtual bool maysupportAc3(){return true;} // We are not sure maybe we support this, allows the player to select ac3, if there is no other option
80 virtual bool streamTypeSupported(int streamtype)
94 MediaPacket mediapacket;
96 virtual long long SetStartOffset(long long curreftime, bool *rsync);
97 virtual void ResetTimeOffsets();
100 IBaseFilter *getAudioFilter();
101 IBaseFilter *getMp3AudioFilter();
102 void initFilterDatabase();
103 void initMp3FilterDatabase();
104 AudioFilterDescList audiofilterlist;
105 AudioFilterDescList mp3audiofilterlist;
106 int audiofilterselected;
107 int mp3audiofilterselected;