VirtualBox

source: vbox/trunk/src/VBox/Main/include/AudioSettingsImpl.h@ 95753

Last change on this file since 95753 was 95423, checked in by vboxsync, 3 years ago

Audio/Main: Bigger revamp of the audio interface(s) to later also support host audio device enumeration and selection for individual VMs. The audio settings now live in a dedicated (per-VM) IAudioSettings interface (audio adapter + audio host device stuff), to further tidy up the IMachine interface. Also added stubs for IAudioDevice + IHostAudioDevice, plus enmuerations, left for further implementation. Added a new IHostAudioDeviceChangedEvent that can also be used later by API clients. bugref:10050

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: AudioSettingsImpl.h 95423 2022-06-29 11:13:40Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2022 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20#ifndef MAIN_INCLUDED_AudioSettingsImpl_h
21#define MAIN_INCLUDED_AudioSettingsImpl_h
22#ifndef RT_WITHOUT_PRAGMA_ONCE
23# pragma once
24#endif
25
26#include "AudioAdapterImpl.h"
27#include "GuestOSTypeImpl.h"
28
29#include "AudioSettingsWrap.h"
30namespace settings
31{
32 struct AudioSettings;
33}
34
35class ATL_NO_VTABLE AudioSettings :
36 public AudioSettingsWrap
37{
38public:
39
40 DECLARE_COMMON_CLASS_METHODS(AudioSettings)
41
42 HRESULT FinalConstruct();
43 void FinalRelease();
44
45 // public initializer/uninitializer for internal purposes only
46 HRESULT init(Machine *aParent);
47 HRESULT init(Machine *aParent, AudioSettings *aThat);
48 HRESULT initCopy(Machine *aParent, AudioSettings *aThat);
49 void uninit();
50
51 HRESULT getHostAudioDevice(AudioDirection_T aUsage, ComPtr<IHostAudioDevice> &aDevice);
52 HRESULT setHostAudioDevice(const ComPtr<IHostAudioDevice> &aDevice, AudioDirection_T aUsage);
53 HRESULT getAdapter(ComPtr<IAudioAdapter> &aAdapter);
54
55 // public methods only for internal purposes
56 Machine* i_getParent(void);
57 bool i_canChangeSettings(void);
58 void i_onAdapterChanged(IAudioAdapter *pAdapter);
59 void i_onHostDeviceChanged(IHostAudioDevice *pDevice, bool fIsNew, AudioDeviceState_T enmState, IVirtualBoxErrorInfo *pErrInfo);
60 void i_onSettingsChanged(void);
61 HRESULT i_loadSettings(const settings::AudioAdapter &data);
62 HRESULT i_saveSettings(settings::AudioAdapter &data);
63 void i_copyFrom(AudioSettings *aThat);
64 HRESULT i_applyDefaults(ComObjPtr<GuestOSType> &aGuestOsType);
65
66 void i_rollback();
67 void i_commit();
68
69private:
70
71 struct Data;
72 Data *m;
73};
74#endif /* !MAIN_INCLUDED_AudioSettingsImpl_h */
75
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette