VirtualBox

source: vbox/trunk/src/VBox/Main/src-server/HostAudioDeviceImpl.cpp@ 98351

Last change on this file since 98351 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: HostAudioDeviceImpl.cpp 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Host audio device implementation.
4 */
5
6/*
7 * Copyright (C) 2022-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#define LOG_GROUP LOG_GROUP_MAIN_HOSTAUDIODEVICE
29#include "HostAudioDeviceImpl.h"
30#include "VirtualBoxImpl.h"
31
32#include <iprt/cpp/utils.h>
33
34#include <VBox/settings.h>
35
36#include "AutoCaller.h"
37#include "LoggingNew.h"
38
39
40// constructor / destructor
41////////////////////////////////////////////////////////////////////////////////
42
43HostAudioDevice::HostAudioDevice()
44{
45}
46
47HostAudioDevice::~HostAudioDevice()
48{
49}
50
51HRESULT HostAudioDevice::FinalConstruct()
52{
53 return BaseFinalConstruct();
54}
55
56void HostAudioDevice::FinalRelease()
57{
58 uninit();
59 BaseFinalRelease();
60}
61
62
63// public initializer/uninitializer for internal purposes only
64////////////////////////////////////////////////////////////////////////////////
65
66/**
67 * Initializes the audio device object.
68 *
69 * @returns HRESULT
70 */
71HRESULT HostAudioDevice::init(void)
72{
73 /* Enclose the state transition NotReady->InInit->Ready */
74 AutoInitSpan autoInitSpan(this);
75 AssertReturn(autoInitSpan.isOk(), E_FAIL);
76
77 /* Confirm a successful initialization */
78 autoInitSpan.setSucceeded();
79
80 return S_OK;
81}
82
83/**
84 * Uninitializes the instance and sets the ready flag to FALSE.
85 * Called either from FinalRelease() or by the parent when it gets destroyed.
86 */
87void HostAudioDevice::uninit(void)
88{
89 LogFlowThisFunc(("\n"));
90
91 /* Enclose the state transition Ready->InUninit->NotReady */
92 AutoUninitSpan autoUninitSpan(this);
93 if (autoUninitSpan.uninitDone())
94 return;
95}
96
97
98// IHostAudioDevice properties
99////////////////////////////////////////////////////////////////////////////////
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