This URL has Read-Only access.

Statistics
| Branch: | Tag: | Revision:

root / src / spin / SoundSpace.cpp @ 9d70071e

History | View | Annotate | Download (3.3 kB)

1
// -----------------------------------------------------------------------------
2
// |    ___  ___  _  _ _     ___                                        _      |
3
// |   / __>| . \| || \ |   | __>_ _  ___ ._ _ _  ___  _ _ _  ___  _ _ | |__   |
4
// |   \__ \|  _/| ||   |   | _>| '_><_> || ' ' |/ ._>| | | |/ . \| '_>| / /   |
5
// |   <___/|_|  |_||_\_|   |_| |_|  <___||_|_|_|\___.|__/_/ \___/|_|  |_\_\   |
6
// |                                                                           |
7
// |---------------------------------------------------------------------------|
8
//
9
// http://spinframework.sourceforge.net
10
// Copyright (C) 2009 Mike Wozniewski, Zack Settel
11
//
12
// Developed/Maintained by:
13
//    Mike Wozniewski (http://www.mikewoz.com)
14
//    Zack Settel (http://www.sheefa.net/zack)
15
// 
16
// Principle Partners:
17
//    Shared Reality Lab, McGill University (http://www.cim.mcgill.ca/sre)
18
//    La Societe des Arts Technologiques (http://www.sat.qc.ca)
19
//
20
// Funding by:
21
//    NSERC/Canada Council for the Arts - New Media Initiative
22
//    Heritage Canada
23
//    Ministere du Developpement economique, de l'Innovation et de l'Exportation
24
//
25
// -----------------------------------------------------------------------------
26
//  This file is part of the SPIN Framework.
27
//
28
//  SPIN Framework is free software: you can redistribute it and/or modify
29
//  it under the terms of the GNU Lesser General Public License as published by
30
//  the Free Software Foundation, either version 3 of the License, or
31
//  (at your option) any later version.
32
//
33
//  SPIN Framework is distributed in the hope that it will be useful,
34
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
35
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36
//  GNU Lesser General Public License for more details.
37
//
38
//  You should have received a copy of the GNU Lesser General Public License
39
//  along with SPIN Framework. If not, see <http://www.gnu.org/licenses/>.
40
// -----------------------------------------------------------------------------
41

    
42

    
43
#include "SoundSpace.h"
44
#include "SceneManager.h"
45
#include "spinApp.h"
46
#include "spinBaseContext.h"
47

    
48
using namespace std;
49

    
50
//extern SceneManager *sceneManager;
51

    
52
namespace spin
53
{
54

    
55
// ===================================================================
56
// constructor:
57
SoundSpace::SoundSpace (SceneManager *sceneManager, char *initID) : DSPNode(sceneManager, initID)
58
{
59
        nodeType = "SoundSpace";
60
        absorption = 0.6;
61
        filterCoef = 0.0;
62
        transition = 0.0;
63
}
64

    
65
// ===================================================================
66
// destructor
67
SoundSpace::~SoundSpace()
68
{
69

    
70
}
71

    
72
// ===================================================================
73
// ======================= DRAW METHODS: =============================
74
// ===================================================================
75

    
76
void SoundSpace::setAbsorption (t_floatarg newval)
77
{
78
        absorption = newval;
79
        BROADCAST(this, "sf", "setAbsorption", absorption);
80
}
81

    
82
void SoundSpace::setFilterCoef (t_floatarg newval)
83
{
84
        filterCoef = newval;
85
        BROADCAST(this, "sf", "setFilterCoef", filterCoef);
86
}
87

    
88
void SoundSpace::setTransition (t_floatarg newval)
89
{
90
        transition = newval;
91
        BROADCAST(this, "sf", "setTransition", transition);
92
}
93

    
94
std::vector<lo_message> SoundSpace::getState () const
95
{
96
        std::vector<lo_message> ret;
97
        return ret;
98
}
99

    
100
} // end of namespace spin