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

AudioStreamCallback.h
/*
* Copyright (C) 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_STREAM_CALLBACK_H
#define OBOE_STREAM_CALLBACK_H
#include "oboe/Definitions.h"
namespace oboe {
class AudioStream;
class AudioStreamCallback {
public:
virtual ~AudioStreamCallback() = default;
virtual DataCallbackResult onAudioReady(
AudioStream *oboeStream,
void *audioData,
int32_t numFrames) = 0;
virtual void onErrorBeforeClose(AudioStream* /* oboeStream */, Result /* error */) {}
virtual void onErrorAfterClose(AudioStream* /* oboeStream */, Result /* error */) {}
};
} // namespace oboe
#endif //OBOE_STREAM_CALLBACK_H
oboe::AudioStreamCallback
Definition: AudioStreamCallback.h:33
oboe::DataCallbackResult
DataCallbackResult
Definition: Definitions.h:119
oboe::AudioStreamCallback::onAudioReady
virtual DataCallbackResult onAudioReady(AudioStream *oboeStream, void *audioData, int32_t numFrames)=0
oboe::AudioStream
Definition: AudioStream.h:44
oboe::AudioStreamCallback::onErrorAfterClose
virtual void onErrorAfterClose(AudioStream *, Result)
Definition: AudioStreamCallback.h:117
oboe::AudioStreamCallback::onErrorBeforeClose
virtual void onErrorBeforeClose(AudioStream *, Result)
Definition: AudioStreamCallback.h:103
oboe::Result
Result
Definition: Definitions.h:131
oboe
Definition: AudioStream.h:31