Just Intonation  Version 1.3.0 (18)
Explore scale-independent dynamically adapting tuning in just intonation
audioparameters.cpp
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Structure holding the parameters and status of an audio device
22 //=============================================================================
23 
24 #include "audioparameters.h"
25 
26 //-----------------------------------------------------------------------------
27 // Compare audio parameters
28 //-----------------------------------------------------------------------------
29 
36 
38 {
39  return deviceName == p.deviceName and
40  channelCount == p.channelCount and
41  sampleSize == p.sampleSize and
42  bufferSize == p.bufferSize and
43  sampleRate == p.sampleRate and
45  active == p.active;
46 }
47 
48 
49 //-----------------------------------------------------------------------------
50 // Default constructor for audio paramters
51 //-----------------------------------------------------------------------------
52 
56 
58  : deviceName("")
59  , channelCount(0)
60  , sampleSize(16)
61  , bufferSize(0)
62  , sampleRate(0)
64  , active(false)
65  , muted(false)
66 {}
67 
68 
69 
70 
71 
int sampleSize
Sample size (16 or 24)
bool active
True of device is active.
QString deviceName
Name of the audio device.
Structure holding the parameters and status of an audio device.
int sampleRate
Actual sample rate.
int bufferSize
Buffer size of the device if applicable.
bool operator==(const AudioParameters &p) const
Compare two sets of audio parameters.
AudioParameters()
Default constructor for void audio parameters.
QList< int > supportedSampleRates
List of supported sample rates.
int channelCount
Number of channels (mono=1, stereo=2)
bool muted
True if device is muted.