Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[3e4acc]: libkwave / PlaybackDeviceFactory.h Maximize Restore History

Download this file

PlaybackDeviceFactory.h    67 lines (57 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/***************************************************************************
PlaybackDeviceFactory.h - interface for playback device factories
-------------------
begin : Mon May 19 2003
copyright : (C) 2003 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _PLAYBACK_DEVICE_FACTORY_H_
#define _PLAYBACK_DEVICE_FACTORY_H_
// some forward declarations
class PlayBackParam;
class PlayBackDevice;
class QString;
class PlaybackDeviceFactory
{
public:
/** virtual destructor, just to satisfy gcc */
virtual ~PlaybackDeviceFactory()
{
}
/**
* Opens and initializes the playback device. If the initialization
* worked, it returns a valid pointer. On any errors m_device
* will be 0. If a device was open before, it will be closed.
* @param name the name of the logical playback device or the name
* of the lowlevel device. If null or zero-length, the
* default device will be used.
* @param tracks number of tracks,
* if negative use the setting of playback_params
* @param playback_params points to a structure with playback
* parameters. If null, the default parameters
* of the current signal will be used
* @return a pointer to an opened PlayBackDevice or null if something
* failed
* @see PlayBackDevice
*/
virtual PlayBackDevice *openDevice(const QString &name,
int tracks = -1,
const PlayBackParam *playback_params = 0) = 0;
/**
* Returns true if the given device name is supported
* and can be used for openDevice.
* @param name the name of a playback device
* @return true if supported
* @see openDevice
*/
virtual bool supportsDevice(const QString &name) = 0;
};
#endif /* _PLAYBACK_DEVICE_FACTORY_H_ */