mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-18 22:05:40 -05:00
Including C headers inside of `extern "C"` breaks use from C++. Hoist the includes of standard C headers above the block so we don't try to mangle the stdlib. I initially tried to scope this with a targeted change but it's too hard to do correctly that way. This way, we avoid whack-a-mole. Firefox is working around this in their e21461b7b8b39cc31ba53c47d4f6f310c673ff2f commit. Bug: https://bugzilla.mozilla.org/1953080
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
/* Simple Plugin API */
|
|
/* SPDX-FileCopyrightText: Copyright © 2023 Wim Taymans */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef SPA_AUDIO_MP3_H
|
|
#define SPA_AUDIO_MP3_H
|
|
|
|
#include <spa/param/audio/raw.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* \addtogroup spa_param
|
|
* \{
|
|
*/
|
|
|
|
enum spa_audio_mp3_channel_mode {
|
|
SPA_AUDIO_MP3_CHANNEL_MODE_UNKNOWN,
|
|
/** Mono mode, only used if channel count is 1 */
|
|
SPA_AUDIO_MP3_CHANNEL_MODE_MONO,
|
|
/** Regular stereo mode with two independent channels */
|
|
SPA_AUDIO_MP3_CHANNEL_MODE_STEREO,
|
|
/**
|
|
* Joint stereo mode, exploiting the similarities between channels
|
|
* using techniques like mid-side coding
|
|
*/
|
|
SPA_AUDIO_MP3_CHANNEL_MODE_JOINTSTEREO,
|
|
/**
|
|
* Two mono tracks, different from stereo in that each channel
|
|
* contains entirely different content (like two different mono songs)
|
|
*/
|
|
SPA_AUDIO_MP3_CHANNEL_MODE_DUAL,
|
|
};
|
|
|
|
struct spa_audio_info_mp3 {
|
|
uint32_t rate; /*< sample rate in Hz */
|
|
uint32_t channels; /*< number of channels */
|
|
enum spa_audio_mp3_channel_mode channel_mode; /*< MP3 channel mode */
|
|
};
|
|
|
|
#define SPA_AUDIO_INFO_MP3_INIT(...) ((struct spa_audio_info_mp3) { __VA_ARGS__ })
|
|
|
|
/**
|
|
* \}
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* SPA_AUDIO_MP3_H */
|