Beatmup
Beatmup::Audio::Signal::Reader Class Reference

Provides reading access to the signal. More...

#include <signal.h>

Inheritance diagram for Beatmup::Audio::Signal::Reader:
Beatmup::Audio::Signal::Pointer

Public Member Functions

 Reader (Signal &signal, dtime time)
 
dtime acquireBuffer (const void *&data)
 
- Public Member Functions inherited from Beatmup::Audio::Signal::Pointer
 Pointer (Signal &signal, dtime time, bool writing)
 
virtual void releaseBuffer ()
 
unsigned char getChannelCount () const
 

Detailed Description

Provides reading access to the signal.

Definition at line 53 of file signal.h.

Constructor & Destructor Documentation

◆ Reader()

Signal::Reader::Reader ( Signal signal,
dtime  time 
)

Definition at line 156 of file signal.cpp.

156 : Pointer(signal, time, false) {};
Pointer(Signal &signal, dtime time, bool writing)
Definition: signal.cpp:143
jlong jlong jint time

Member Function Documentation

◆ acquireBuffer()

dtime Signal::Reader::acquireBuffer ( const void *&  data)

Definition at line 159 of file signal.cpp.

159  {
160  if (pointer.isNull()) {
161  data = nullptr;
162  return 0;
163  }
164  SignalFragment* fragment = (SignalFragment*)pointer.fragment;
165  data = fragment->getData() + pointer.offset * fragment->getBlockSize();
166  return pointer.length;
167 }
JNIEnv jobject jint jint jint jfloat fragment

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