Beatmup
Beatmup::Audio::Android::AAudioPlayback Class Reference

AAudio Android playback. More...

#include <aaudio_playback.h>

Inheritance diagram for Beatmup::Audio::Android::AAudioPlayback:
Beatmup::Audio::BasicRealtimePlayback Beatmup::Audio::AbstractPlayback Beatmup::AbstractTask Beatmup::Object

Classes

class  Backend
 

Public Member Functions

 AAudioPlayback ()
 
 ~AAudioPlayback ()
 
void initialize (Mode mode)
 Initializes the playback setting its main parameters. More...
 
void start ()
 Starts playback. More...
 
void stop ()
 Stops playback. More...
 
- Public Member Functions inherited from Beatmup::Audio::BasicRealtimePlayback
virtual ~BasicRealtimePlayback ()
 
bool process (TaskThread &thread)
 Executes the task on CPU within a given thread. More...
 
void bufferQueueCallbackFunc ()
 
void pullBuffer (sample8 *buffer, dtime numFrames)
 Called in pulling output mode to send data to output. More...
 
- Public Member Functions inherited from Beatmup::Audio::AbstractPlayback
ThreadIndex getMaxThreads () const
 Gives the upper limint on the number of threads the task may be performed by. More...
 
void beforeProcessing (ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu)
 Instruction called before the task is executed. More...
 
void setSource (Source *source)
 Specifies a Source to sample. More...
 
SourcegetSource () const
 Returns the signal source to sample. More...
 
- Public Member Functions inherited from Beatmup::AbstractTask
virtual void afterProcessing (ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted)
 Instruction called after the task is executed. More...
 
virtual bool processOnGPU (GraphicPipeline &gpu, TaskThread &thread)
 Executes the task on GPU. More...
 
virtual TaskDeviceRequirement getUsedDevices () const
 Communicates devices (CPU and/or GPU) the task is run on. More...
 
- Public Member Functions inherited from Beatmup::Object
virtual ~Object ()
 

Protected Attributes

Backendbackend
 
- Protected Attributes inherited from Beatmup::Audio::BasicRealtimePlayback
msize bufferSize
 size of each buffer in bytes More...
 
- Protected Attributes inherited from Beatmup::Audio::AbstractPlayback
Mode mode
 
Sourcesource
 
dtime clock
 

Additional Inherited Members

- Public Types inherited from Beatmup::AbstractTask
enum class  TaskDeviceRequirement { CPU_ONLY , GPU_OR_CPU , GPU_ONLY }
 Specifies which device (CPU and/or GPU) is used to run the task. More...
 
- Static Public Member Functions inherited from Beatmup::AbstractTask
static ThreadIndex validThreadCount (int number)
 Valid thread count from a given integer value. More...
 
- Protected Types inherited from Beatmup::Audio::BasicRealtimePlayback
enum class  OutputMode { PULL , PUSH }
 Specifies how the output audio signal is handled by the audio backend. More...
 
- Protected Member Functions inherited from Beatmup::Audio::BasicRealtimePlayback
 BasicRealtimePlayback (OutputMode)
 
virtual sample8createBuffer (const AbstractPlayback::Mode &mode) const
 Creates an atomic playing buffer. More...
 
virtual void freeBuffer (sample8 *buffer) const
 Frees an atomic playing buffer. More...
 
virtual void pushBuffer (sample8 *buffer, int bufferIndex)
 Pushes some data to the output. More...
 
- Protected Member Functions inherited from Beatmup::Audio::AbstractPlayback
 AbstractPlayback ()
 
void advanceTime ()
 Moves time pointer one buffer forward. More...
 

Detailed Description

AAudio Android playback.

Definition at line 33 of file aaudio_playback.h.

Constructor & Destructor Documentation

◆ AAudioPlayback()

Android::AAudioPlayback::AAudioPlayback ( )

Definition at line 134 of file aaudio_playback.cpp.

135  backend = new Backend();
136 }
@ PULL
The output is requested by pullOutput(..) called by the audio backend.

◆ ~AAudioPlayback()

Android::AAudioPlayback::~AAudioPlayback ( )

Definition at line 138 of file aaudio_playback.cpp.

138  {
139  delete backend;
140 }

Member Function Documentation

◆ initialize()

void Android::AAudioPlayback::initialize ( AbstractPlayback::Mode  mode)
virtual

Initializes the playback setting its main parameters.

Reimplemented from Beatmup::Audio::BasicRealtimePlayback.

Definition at line 142 of file aaudio_playback.cpp.

142  {
144  backend->initialize(this, mode);
145 }
void initialize(BasicRealtimePlayback *frontend, AbstractPlayback::Mode mode)
void initialize(Mode mode)
Initializes the playback setting its main parameters.

◆ start()

void Android::AAudioPlayback::start ( )
virtual

Starts playback.

Reimplemented from Beatmup::Audio::BasicRealtimePlayback.

Definition at line 147 of file aaudio_playback.cpp.

◆ stop()

void Android::AAudioPlayback::stop ( )
virtual

Stops playback.

Implements Beatmup::Audio::BasicRealtimePlayback.

Definition at line 152 of file aaudio_playback.cpp.

Member Data Documentation

◆ backend

Backend* Beatmup::Audio::Android::AAudioPlayback::backend
protected

Definition at line 36 of file aaudio_playback.h.


The documentation for this class was generated from the following files: