21 #include "include/Beatmup_Audio_Signal.h"
22 #include "include/Beatmup_Audio_SignalPlot.h"
23 #include "include/Beatmup_Audio_Playback.h"
24 #include "include/Beatmup_Audio_HarmonicSource.h"
35 JNIMETHOD(
jlong, newAudioSignal, Java_Beatmup_Audio_Signal, newAudioSignal)
44 JNIMETHOD(
jlong, newAudioSignalFromWAV, Java_Beatmup_Audio_Signal, newAudioSignalFromWAV)
48 const char*
javaChar =
jenv->GetStringUTFChars(jsFilename, 0);
62 JNIMETHOD(
jlong, newAudioSignalSource, Java_Beatmup_Audio_Signal, newAudioSignalSource)
71 JNIMETHOD(jint, getDuration, Java_Beatmup_Audio_Signal, getDuration)
76 return (jint)signal->getDuration();
80 JNIMETHOD(jint, getSampleFormat, Java_Beatmup_Audio_Signal, getSampleFormat)
85 return (jint)signal->getSampleFormat();
94 return signal->getChannelCount();
102 JNIMETHOD(
jlong, newSignalPlot, Java_Beatmup_Audio_SignalPlot, newSignalPlot)
110 JNIMETHOD(
void, prepareMetering, Java_Beatmup_Audio_SignalPlot, prepareMetering)
125 plot->setSignal(signal);
183 JNIMETHOD(
jlong, newPlayback, Java_Beatmup_Audio_Playback, newPlayback)
191 JNIMETHOD(
void, initialize, Java_Beatmup_Audio_Playback, initialize)
192 (JNIEnv *
jenv,
jobject,
jlong handle, jint sampleRate, jint sampleFormat, jint numChannels, jint bufferLength, jint numBuffers)
231 pb->setSource(source);
238 JNIMETHOD(
jlong, newHarmonicSource, Java_Beatmup_Audio_HarmonicSource, newHarmonicSource)
245 JNIMETHOD(
void, setFrequency, Java_Beatmup_Audio_HarmonicSource, setFrequency)
250 source->setFrequency(hz);
266 source->setAmplitude(
amp);
static void throwToJava(JNIEnv *jenv, const char *exceptionClass, const char *message)
Throws a specific exception.
static const jlong INVALID_HANDLE
A very basic class for any image.
Abstract audio playback base class.
OpenSL ES Android playback.
A Source producing a sinusoidal signal, mainly for test purposes.
Communicates an error occurred during the playback.
AbstractTask drawing amplitude graph of a given Signal in a bitmap.
static void prepareSignal(Signal &signal, bool runTask=true)
Precomputes the dynamics lookup all over the signal, where needed.
Audio::Source reading samples from a given Signal.
static Signal * loadWAV(Context &ctx, const char *fileName)
Abstract source of audio signal.
Basic class: task and memory management, any kind of static data.
Base class for all exceptions.
virtual const char * what() const NOEXCEPT override
color4i fromPackedInt(int32_t _)
AudioSampleFormat
Format of audio samples.
BeatmupJavaObjectPool $pool
JNIEnv jlong jint jint color1
JNIEnv jobject jlong handle
JNIMETHOD(void, start, Java_Beatmup_Audio_Playback, start)(JNIEnv *jenv
JNIEnv jlong jlong hSignal
JNIEnv jlong jint jint jint jint y2
JNIEnv jlong jobject jSource
JNIEnv jlong jint jint jint jint jfloat scale
JNIEnv jobject jint jint samplerate
JNIEnv jlong jobject jBitmap
JNIEnv jlong jint jint t2
JNIEnv jobject jint jint jint channels
JNIEnv jlong jint background
return signal getChannelCount()
JNIEnv jobject jint jint jint jfloat fragment
JNIEnv jlong jint jint jint x2
JNIEnv jlong jint jint jint color2
JNIEnv jlong jint jint jint y1
plot setWindow(Beatmup::IntRectangle(t1, y1, t2, y2), scale)
plot setChannels(channels)
plot setPalette(Beatmup::fromPackedInt((int32_t) background), Beatmup::fromPackedInt((int32_t) color1), Beatmup::fromPackedInt((int32_t) color2))
plot setPlotArea(Beatmup::IntRectangle(x1, y1, x2, y2))
JNIEnv jobject jint format
BEATMUP_OBJ(Beatmup::Context, ctx, jCtx)
JNIEnv jlong jstring filename
Beatmup::InternalBitmap * bitmap