# Oboe: include/oboe/Utilities.h Source File

Utilities.h
/*
* Copyright 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OBOE_UTILITIES_H
#define OBOE_UTILITIES_H
#include <unistd.h>
#include <sys/types.h>
#include "oboe/Definitions.h"
namespace oboe {
void convertFloatToPcm16(const float *source, int16_t *destination, int32_t numSamples);
void convertPcm16ToFloat(const int16_t *source, float *destination, int32_t numSamples);
int32_t convertFormatToSizeInBytes(AudioFormat format);
template <typename FromType>
const char * convertToText(FromType input);
int getSdkVersion();
} // namespace oboe
#endif //OBOE_UTILITIES_H
oboe::convertFloatToPcm16
void convertFloatToPcm16(const float *source, int16_t *destination, int32_t numSamples)
oboe::convertToText
const char * convertToText(FromType input)
oboe::convertPcm16ToFloat
void convertPcm16ToFloat(const int16_t *source, float *destination, int32_t numSamples)
oboe::AudioFormat
AudioFormat
Definition: Definitions.h:94
oboe::convertFormatToSizeInBytes
int32_t convertFormatToSizeInBytes(AudioFormat format)
oboe
Definition: AudioStream.h:31
oboe::getSdkVersion
int getSdkVersion()