Open Broadcaster Software
Free, open source software for live streaming and recording
audio-resampler.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
17 
18 #pragma once
19 
20 #include "../util/c99defs.h"
21 #include "audio-io.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct audio_resampler;
28 typedef struct audio_resampler audio_resampler_t;
29 
30 struct resample_info {
31  uint32_t samples_per_sec;
34 };
35 
37 audio_resampler_create(const struct resample_info *dst,
38  const struct resample_info *src);
40 
42  uint8_t *output[], uint32_t *out_frames,
43  uint64_t *ts_offset,
44  const uint8_t *const input[],
45  uint32_t in_frames);
46 
47 #ifdef __cplusplus
48 }
49 #endif
audio_resampler_create
EXPORT audio_resampler_t * audio_resampler_create(const struct resample_info *dst, const struct resample_info *src)
resample_info::speakers
enum speaker_layout speakers
Definition: audio-resampler.h:33
EXPORT
#define EXPORT
Definition: c99defs.h:37
audio_resampler_t
struct audio_resampler audio_resampler_t
Definition: audio-resampler.h:28
audio_resampler_destroy
EXPORT void audio_resampler_destroy(audio_resampler_t *resampler)
speaker_layout
speaker_layout
Definition: audio-io.h:67
audio_resampler_resample
EXPORT bool audio_resampler_resample(audio_resampler_t *resampler, uint8_t *output[], uint32_t *out_frames, uint64_t *ts_offset, const uint8_t *const input[], uint32_t in_frames)
audio-io.h
resample_info
Definition: audio-resampler.h:30
audio_format
audio_format
Definition: audio-io.h:44
resample_info::samples_per_sec
uint32_t samples_per_sec
Definition: audio-resampler.h:31
resample_info::format
enum audio_format format
Definition: audio-resampler.h:32