0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/libobs/media-io/audio-resampler.h
2013-10-30 17:07:01 -07:00

39 lines
1.4 KiB
C

/******************************************************************************
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#pragma once
#include "../util/c99defs.h"
#include "audio-io.h"
struct audio_resampler;
typedef struct audio_resampler *audio_resampler_t;
struct resample_info {
uint32_t samples_per_sec;
enum audio_format format;
enum speaker_layout speakers;
};
EXPORT audio_resampler_t audio_resampler_create(struct resample_info *dst,
struct resample_info *src);
EXPORT void audio_resampler_destroy(audio_resampler_t resampler);
EXPORT bool audio_resampler_resample(audio_resampler_t resampler,
void **output, uint32_t *out_frames,
void *input, uint32_t in_frames);