~ubuntu-branches/ubuntu/dapper/lmms/dapper

« back to all changes in this revision

Viewing changes to include/audio_port.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ragwitz
  • Date: 2005-12-22 16:22:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051222162250-key3p7x0212jy6dn
Tags: 0.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * audio_port.h - base-class for objects providing sound at a port
 
3
 *
 
4
 * Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
5
 * 
 
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public
 
19
 * License along with this program (see COPYING); if not, write to the
 
20
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
21
 * Boston, MA 02111-1307, USA.
 
22
 *
 
23
 */
 
24
 
 
25
 
 
26
#ifndef _AUDIO_PORT_H
 
27
#define _AUDIO_PORT_H
 
28
 
 
29
#include "qt3support.h"
 
30
 
 
31
#ifdef QT4
 
32
 
 
33
#include <QString>
 
34
 
 
35
#else
 
36
 
 
37
#include <qstring.h>
 
38
 
 
39
#endif
 
40
 
 
41
 
 
42
#include "mixer.h"
 
43
#include "effect_board.h"
 
44
 
 
45
 
 
46
class audioPort
 
47
{
 
48
public:
 
49
        audioPort( const QString & _name );
 
50
        ~audioPort();
 
51
 
 
52
        inline surroundSampleFrame * firstBuffer( void )
 
53
        {
 
54
                return( m_firstBuffer );
 
55
        }
 
56
        inline surroundSampleFrame * secondBuffer( void )
 
57
        {
 
58
                return( m_secondBuffer );
 
59
        }
 
60
 
 
61
        void nextPeriod( void );
 
62
 
 
63
 
 
64
        // indicate whether JACK & Co should provide output-buffer at ext. port
 
65
        inline bool extOutputEnabled( void ) const
 
66
        {
 
67
                return( m_extOutputEnabled );
 
68
        }
 
69
        void FASTCALL setExtOutputEnabled( bool _enabled );
 
70
 
 
71
 
 
72
        // next effect-channel after this audio-port
 
73
        // (-1 = none  0 = master)
 
74
        inline fxChnl nextFxChannel( void ) const
 
75
        {
 
76
                return( m_nextFxChannel );
 
77
        }
 
78
        void setNextFxChannel( fxChnl _chnl )
 
79
        {
 
80
                m_nextFxChannel = _chnl;
 
81
        }
 
82
 
 
83
        const QString & name( void ) const
 
84
        {
 
85
                return( m_name );
 
86
        }
 
87
 
 
88
        void setName( const QString & _new_name );
 
89
 
 
90
        enum bufferUsages
 
91
        {
 
92
                NONE, FIRST, BOTH
 
93
        } m_bufferUsage;
 
94
 
 
95
 
 
96
private:
 
97
        surroundSampleFrame * m_firstBuffer;
 
98
        surroundSampleFrame * m_secondBuffer;
 
99
        bool m_extOutputEnabled;
 
100
        fxChnl m_nextFxChannel;
 
101
 
 
102
        QString m_name;
 
103
 
 
104
} ;
 
105
 
 
106
 
 
107
#endif