~oxalin/lightspark/buildnaudioplugin

« back to all changes in this revision

Viewing changes to backends/interfaces/audio/IAudioPlugin.cpp

  • Committer: Alessandro
  • Date: 2010-09-06 19:31:31 UTC
  • mfrom: (911.13.93)
  • Revision ID: git-v1:9f6175895e49dc81d39f6f99e66e2adc5a82bdb3
Merge branch 'master' of http://github.com/Oxalin/lightspark

Conflicts:
        CMakeLists.txt
        scripting/flashnet.cpp

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
    Lightspark, a free flash player implementation
 
3
 
 
4
    Copyright (C) 2009,2010  Alessandro Pignotti (a.pignotti@sssup.it)
 
5
    Copyright (C) 2010 Alexandre Demers (papouta@hotmail.com)
 
6
 
 
7
    This program is free software: you can redistribute it and/or modify
 
8
    it under the terms of the GNU Lesser General Public License as published by
 
9
    the Free Software Foundation, either version 3 of the License, or
 
10
    (at your option) any later version.
 
11
 
 
12
    This program is distributed in the hope that it will be useful,
 
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
    GNU Lesser General Public License for more details.
 
16
 
 
17
    You should have received a copy of the GNU Lesser General Public License
 
18
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
**************************************************************************/
 
20
 
 
21
#include "IAudioPlugin.h"
 
22
#include <iostream>
 
23
 
 
24
using namespace std;
 
25
 
 
26
 
 
27
IAudioPlugin::IAudioPlugin ( string plugin_name, string backend_name, bool init_stopped ):
 
28
        IPlugin(AUDIO, plugin_name, backend_name), stopped(init_stopped)
 
29
{
 
30
 
 
31
}
 
32
 
 
33
string IAudioPlugin::get_device ( DEVICE_TYPES desiredType )
 
34
{
 
35
        if ( PLAYBACK )
 
36
        {
 
37
                return playbackDeviceName;
 
38
        }
 
39
        else if ( CAPTURE )
 
40
        {
 
41
                return captureDeviceName;
 
42
        }
 
43
        else
 
44
        {
 
45
                return NULL;
 
46
        }
 
47
}
 
48
 
 
49
vector< string* > *IAudioPlugin::get_devicesList ( DEVICE_TYPES desiredType )
 
50
{
 
51
        if ( desiredType == PLAYBACK )
 
52
        {
 
53
                return &playbackDevicesList;
 
54
        }
 
55
        else if ( desiredType == CAPTURE )
 
56
        {
 
57
                return &captureDevicesList;
 
58
        }
 
59
        else
 
60
        {
 
61
                return NULL;
 
62
        }
 
63
}
 
64
 
 
65
IAudioPlugin::~IAudioPlugin()
 
66
{
 
67
 
 
68
}
 
69
 
 
70
 
 
71
AudioStream::AudioStream ( lightspark::AudioDecoder* dec, bool initPause ):
 
72
        decoder(NULL), pause(initPause)
 
73
{
 
74
 
 
75
}