2 * Copyright 2007 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _MIXER_SETTINGS_H
6 #define _MIXER_SETTINGS_H
17 #define MAX_INPUT_SETTINGS 50
24 void SetSettingsFile(const char *file
);
26 bool AttenuateOutput();
27 void SetAttenuateOutput(bool yesno
);
29 bool NonLinearGainSlider();
30 void SetNonLinearGainSlider(bool yesno
);
32 bool UseBalanceControl();
33 void SetUseBalanceControl(bool yesno
);
35 bool AllowOutputChannelRemapping();
36 void SetAllowOutputChannelRemapping(bool yesno
);
38 bool AllowInputChannelRemapping();
39 void SetAllowInputChannelRemapping(bool yesno
);
41 int InputGainControls();
42 void SetInputGainControls(int value
);
44 int ResamplingAlgorithm();
45 void SetResamplingAlgorithm(int value
);
47 bool RefuseOutputFormatChange();
48 void SetRefuseOutputFormatChange(bool yesno
);
50 bool RefuseInputFormatChange();
51 void SetRefuseInputFormatChange(bool yesno
);
53 void SaveConnectionSettings(MixerInput
*input
);
54 void LoadConnectionSettings(MixerInput
*input
);
56 void SaveConnectionSettings(MixerOutput
*output
);
57 void LoadConnectionSettings(MixerOutput
*output
);
60 void StartDeferredSave();
61 void StopDeferredSave();
66 static int32
_save_thread_(void *arg
);
71 volatile bool fSettingsDirty
;
72 volatile bigtime_t fSettingsLastChange
;
73 volatile thread_id fSaveThread
;
74 volatile sem_id fSaveThreadWaitSem
;
75 volatile bool fSaveThreadRunning
;
79 bool NonLinearGainSlider
;
80 bool UseBalanceControl
;
81 bool AllowOutputChannelRemapping
;
82 bool AllowInputChannelRemapping
;
83 int InputGainControls
;
84 int ResamplingAlgorithm
;
85 bool RefuseOutputFormatChange
;
86 bool RefuseInputFormatChange
;
89 volatile settings fSettings
;
91 BMessage fOutputSetting
;
92 BMessage fInputSetting
[MAX_INPUT_SETTINGS
];
95 #endif // _MIXER_SETTINGS_H