VirtualBox

source: vbox/trunk/src/VBox/Main/include/AudioAdapterImpl.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.6 KB
Line 
1/* $Id: AudioAdapterImpl.h 95423 2022-06-29 11:13:40Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-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_AudioAdapterImpl_h
21#define MAIN_INCLUDED_AudioAdapterImpl_h
22#ifndef RT_WITHOUT_PRAGMA_ONCE
23# pragma once
24#endif
25
26class AudioSettings;
27
28#include "AudioAdapterWrap.h"
29namespace settings
30{
31 struct AudioAdapter;
32}
33
34class ATL_NO_VTABLE AudioAdapter :
35 public AudioAdapterWrap
36{
37public:
38
39 DECLARE_COMMON_CLASS_METHODS (AudioAdapter)
40
41 HRESULT FinalConstruct();
42 void FinalRelease();
43
44 // public initializer/uninitializer for internal purposes only
45 HRESULT init(AudioSettings *aParent);
46 HRESULT init(AudioSettings *aParent, AudioAdapter *aThat);
47 HRESULT initCopy(AudioSettings *aParent, AudioAdapter *aThat);
48 void uninit();
49
50 // public methods only for internal purposes
51 HRESULT i_loadSettings(const settings::AudioAdapter &data);
52 HRESULT i_saveSettings(settings::AudioAdapter &data);
53
54 void i_rollback();
55 void i_commit();
56 void i_copyFrom(AudioAdapter *aThat);
57
58private:
59
60 // wrapped IAudioAdapter properties
61 HRESULT getEnabled(BOOL *aEnabled);
62 HRESULT setEnabled(BOOL aEnabled);
63 HRESULT getEnabledIn(BOOL *aEnabled);
64 HRESULT setEnabledIn(BOOL aEnabled);
65 HRESULT getEnabledOut(BOOL *aEnabled);
66 HRESULT setEnabledOut(BOOL aEnabled);
67 HRESULT getAudioDriver(AudioDriverType_T *aAudioDriver);
68 HRESULT setAudioDriver(AudioDriverType_T aAudioDriver);
69 HRESULT getAudioController(AudioControllerType_T *aAudioController);
70 HRESULT setAudioController(AudioControllerType_T aAudioController);
71 HRESULT getAudioCodec(AudioCodecType_T *aAudioCodec);
72 HRESULT setAudioCodec(AudioCodecType_T aAudioCodec);
73 HRESULT getPropertiesList(std::vector<com::Utf8Str>& aProperties);
74 HRESULT getProperty(const com::Utf8Str &aKey, com::Utf8Str &aValue);
75 HRESULT setProperty(const com::Utf8Str &aKey, const com::Utf8Str &aValue);
76
77 AudioSettings * const mParent;
78 const ComObjPtr<AudioAdapter> mPeer;
79 Backupable<settings::AudioAdapter> mData;
80};
81
82#endif /* !MAIN_INCLUDED_AudioAdapterImpl_h */
83/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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