Nsound
0.9.4
Main Page
Namespaces
Classes
Files
File List
File Members
Nsound
AudioBackend.cc
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
//
3
// $Id: AudioBackend.cc 874 2014-09-08 02:21:29Z weegreenblobbie $
4
//
5
// Copyright (c) 2005-2006 Nick Hilton
6
//
7
// weegreenblobbie_yahoo_com (replace '_' with '@' and '.')
8
//
9
//-----------------------------------------------------------------------------
10
11
//-----------------------------------------------------------------------------
12
//
13
// This program is free software; you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation; either version 2 of the License, or
16
// (at your option) any later version.
17
//
18
// This program is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU Library General Public License for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with this program; if not, write to the Free Software
25
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
//
27
//-----------------------------------------------------------------------------
28
29
#include <
Nsound/AudioBackend.h
>
30
31
using namespace
Nsound;
32
33
std::string
state_strings
[3] =
34
{
35
"Backend Not Initialized"
,
36
"Backend Ready"
,
37
"Backend Error"
38
};
39
40
//-----------------------------------------------------------------------------
41
std::string
42
AudioBackend::
43
getStateString
()
44
{
45
return
state_strings
[
state_
];
46
}
47
48
//-----------------------------------------------------------------------------
49
std::string
50
AudioBackend::
51
getStateString
(
const
State
& state)
52
{
53
if
( state >=
BACKEND_NOT_INITIALIZED
&&
54
state <=
BACKEND_ERROR
)
55
{
56
return
state_strings
[state];
57
}
58
59
return
"Unknown Backend State"
;
60
}
61
62
63
// :mode=c++:
state_strings
std::string state_strings[3]
Definition:
AudioBackend.cc:33
Nsound::AudioBackend::BACKEND_NOT_INITIALIZED
Definition:
AudioBackend.h:54
Nsound::AudioBackend::getStateString
std::string getStateString()
Returns the backend state.
Definition:
AudioBackend.cc:43
Nsound::AudioBackend::state_
State state_
Definition:
AudioBackend.h:130
Nsound::AudioBackend::State
State
Definition:
AudioBackend.h:52
Nsound::AudioBackend::BACKEND_ERROR
Definition:
AudioBackend.h:56
AudioBackend.h
Generated on Sun Aug 23 2015 11:51:50 for Nsound by
1.8.6