forked from GrandOrgue/grandorgue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added using GODeviceNamePattern in the audio config
- Loading branch information
Showing
22 changed files
with
535 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2006 Milan Digital Audio LLC | ||
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS) | ||
* License GPL-2.0 or later | ||
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html). | ||
*/ | ||
|
||
#include "GOAudioDeviceNode.h" | ||
|
||
#include "config/GOConfigReader.h" | ||
#include "config/GOConfigWriter.h" | ||
|
||
static const wxString WX_NAME = wxT("Name"); | ||
static const wxString WX_LATENCY = wxT("Latency"); | ||
|
||
void GOAudioDeviceNode::LoadDeviceNode( | ||
GOConfigReader &cfg, const wxString &group, const wxString &prefix) { | ||
LoadNamePattern(cfg, group, prefix, WX_NAME); | ||
m_DesiredLatency = cfg.ReadInteger( | ||
CMBSetting, group, prefix + WX_LATENCY, 0, 999, false, DEFAULT_LATENCY); | ||
} | ||
|
||
void GOAudioDeviceNode::SaveDeviceNode( | ||
GOConfigWriter &cfg, const wxString &group, const wxString &prefix) const { | ||
SaveNamePattern(cfg, group, prefix, WX_NAME); | ||
cfg.WriteInteger(group, prefix + WX_LATENCY, m_DesiredLatency); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2006 Milan Digital Audio LLC | ||
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS) | ||
* License GPL-2.0 or later | ||
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html). | ||
*/ | ||
|
||
#ifndef GOAUDIODEVICENODE_H | ||
#define GOAUDIODEVICENODE_H | ||
|
||
#include "GODeviceNamePattern.h" | ||
|
||
class GOConfigReader; | ||
class GOConfigWriter; | ||
|
||
class GOAudioDeviceNode : public GODeviceNamePattern { | ||
private: | ||
static constexpr unsigned DEFAULT_LATENCY = 50; | ||
|
||
unsigned m_DesiredLatency = DEFAULT_LATENCY; | ||
|
||
public: | ||
unsigned GetDesiredLatency() const { return m_DesiredLatency; } | ||
void SetDesiredLatenct(unsigned value) { m_DesiredLatency = value; } | ||
|
||
void LoadDeviceNode( | ||
GOConfigReader &cfg, const wxString &group, const wxString &prefix); | ||
void SaveDeviceNode( | ||
GOConfigWriter &cfg, const wxString &group, const wxString &prefix) const; | ||
}; | ||
|
||
#endif /* GOAUDIODEVICENODE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.