VirtualBox

source: vbox/trunk/src/VBox/Devices/Audio/DrvHostAudioAlsaStubs.h@ 101359

Last change on this file since 101359 was 98103, checked in by vboxsync, 2 years 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.7 KB
Line 
1/* $Id: DrvHostAudioAlsaStubs.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * Stubs for libasound.
4 */
5
6/*
7 * Copyright (C) 2006-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#ifndef VBOX_INCLUDED_SRC_Audio_DrvHostAudioAlsaStubs_h
29#define VBOX_INCLUDED_SRC_Audio_DrvHostAudioAlsaStubs_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <iprt/cdefs.h>
35#include <alsa/version.h>
36
37#define VBOX_ALSA_MAKE_VER(a,b,c) ( ((a) << 24) | ((b) << 16) | (c) )
38#define VBOX_ALSA_VER VBOX_ALSA_MAKE_VER(SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR)
39
40RT_C_DECLS_BEGIN
41extern int audioLoadAlsaLib(void);
42
43#if VBOX_ALSA_VER < VBOX_ALSA_MAKE_VER(1,0,18) /* added in 1.0.18 */
44extern int snd_pcm_avail_delay(snd_pcm_t *, snd_pcm_sframes_t *, snd_pcm_sframes_t *);
45#endif
46
47#if VBOX_ALSA_VER < VBOX_ALSA_MAKE_VER(1,0,14) /* added in 1.0.14a */
48extern int snd_device_name_hint(int, const char *, void ***);
49extern int snd_device_name_free_hint(void **);
50extern char *snd_device_name_get_hint(const void *, const char *);
51#endif
52
53#if VBOX_ALSA_VER < VBOX_ALSA_MAKE_VER(1,0,27) /* added in 1.0.27 */
54enum snd_pcm_chmap_position { SND_CHMAP_UNKNOWN = 0, SND_CHMAP_NA, SND_CHMAP_MONO, SND_CHMAP_FL, SND_CHMAP_FR,
55 SND_CHMAP_RL, SND_CHMAP_RR, SND_CHMAP_FC, SND_CHMAP_LFE, SND_CHMAP_SL, SND_CHMAP_SR, SND_CHMAP_RC,
56 SND_CHMAP_FLC, SND_CHMAP_FRC, SND_CHMAP_RLC, SND_CHMAP_RRC, SND_CHMAP_FLW, SND_CHMAP_FRW, SND_CHMAP_FLH,
57 SND_CHMAP_FCH, SND_CHMAP_FRH, SND_CHMAP_TC, SND_CHMAP_TFL, SND_CHMAP_TFR, SND_CHMAP_TFC, SND_CHMAP_TRL,
58 SND_CHMAP_TRR, SND_CHMAP_TRC, SND_CHMAP_TFLC, SND_CHMAP_TFRC, SND_CHMAP_TSL, SND_CHMAP_TSR, SND_CHMAP_LLFE,
59 SND_CHMAP_RLFE, SND_CHMAP_BC, SND_CHMAP_BLC, SND_CHMAP_BRC };
60typedef struct snd_pcm_chmap
61{
62 unsigned int channels;
63 RT_GCC_EXTENSION
64 unsigned int pos[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION];
65} snd_pcm_chmap_t;
66extern int snd_pcm_set_chmap(snd_pcm_t *, snd_pcm_chmap_t const *);
67#endif
68
69RT_C_DECLS_END
70
71#endif /* !VBOX_INCLUDED_SRC_Audio_DrvHostAudioAlsaStubs_h */
72
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