17 #ifndef OBOE_STABILIZEDCALLBACK_H 18 #define OBOE_STABILIZEDCALLBACK_H 21 #include "oboe/AudioStream.h" 49 int64_t mFrameCount = 0;
50 int64_t mEpochTimeNanos = 0;
51 double mOpsPerNano = 1;
53 void generateLoad(int64_t durationNanos);
60 #if defined(__i386__) || defined(__x86_64__) 61 #define cpu_relax() asm volatile("rep; nop" ::: "memory"); 63 #elif defined(__arm__) || defined(__mips__) 64 #define cpu_relax() asm volatile("":::"memory") 66 #elif defined(__aarch64__) 67 #define cpu_relax() asm volatile("yield" ::: "memory") 70 #error "cpu_relax is not defined for this architecture" 75 #endif //OBOE_STABILIZEDCALLBACK_H DataCallbackResult onAudioReady(AudioStream *oboeStream, void *audioData, int32_t numFrames) override
Definition: AudioStreamCallback.h:181
DataCallbackResult
Definition: Definitions.h:119
virtual void onErrorAfterClose(AudioStream *, Result)
Definition: AudioStreamCallback.h:163
Definition: AudioStream.h:44
Result
Definition: Definitions.h:131
Definition: StabilizedCallback.h:25
Definition: AudioStream.h:31
void onErrorAfterClose(AudioStream *oboeStream, Result error) override
Definition: StabilizedCallback.h:37
void onErrorBeforeClose(AudioStream *oboeStream, Result error) override
Definition: StabilizedCallback.h:33
virtual void onErrorBeforeClose(AudioStream *, Result)
Definition: AudioStreamCallback.h:147