Merge "Use audio_format_t consistently"
diff --git a/audio_utils/echo_reference.c b/audio_utils/echo_reference.c
index 61b92de..0d20290 100644
--- a/audio_utils/echo_reference.c
+++ b/audio_utils/echo_reference.c
@@ -439,17 +439,17 @@
if (rdFormat != AUDIO_FORMAT_PCM_16_BIT ||
rdFormat != wrFormat) {
- LOGW("create_echo_reference bad format rd %d, wr %d", rdFormat, wrFormat);
+ ALOGW("create_echo_reference bad format rd %d, wr %d", rdFormat, wrFormat);
return -EINVAL;
}
if ((rdChannelCount != 1 && rdChannelCount != 2) ||
wrChannelCount != 2) {
- LOGW("create_echo_reference bad channel count rd %d, wr %d", rdChannelCount, wrChannelCount);
+ ALOGW("create_echo_reference bad channel count rd %d, wr %d", rdChannelCount, wrChannelCount);
return -EINVAL;
}
if (wrSamplingRate < rdSamplingRate) {
- LOGW("create_echo_reference bad smp rate rd %d, wr %d", rdSamplingRate, wrSamplingRate);
+ ALOGW("create_echo_reference bad smp rate rd %d, wr %d", rdSamplingRate, wrSamplingRate);
return -EINVAL;
}
diff --git a/audio_utils/resampler.c b/audio_utils/resampler.c
index 3a3b798..1b84fcd 100644
--- a/audio_utils/resampler.c
+++ b/audio_utils/resampler.c
@@ -135,7 +135,7 @@
}
framesWr += outFrames;
rsmp->frames_in -= inFrames;
- LOGW_IF((framesWr != framesRq) && (rsmp->frames_in != 0),
+ ALOGW_IF((framesWr != framesRq) && (rsmp->frames_in != 0),
"ReSampler::resample() remaining %d frames in and %d frames out",
rsmp->frames_in, (framesRq - framesWr));
}
@@ -217,7 +217,7 @@
quality,
&error);
if (rsmp->speex_resampler == NULL) {
- LOGW("ReSampler: Cannot create speex resampler: %s", speex_resampler_strerror(error));
+ ALOGW("ReSampler: Cannot create speex resampler: %s", speex_resampler_strerror(error));
return -ENODEV;
}
diff --git a/mca/filterfw/jni/jni_gl_environment.cpp b/mca/filterfw/jni/jni_gl_environment.cpp
index a9eb27e..3c596a4 100644
--- a/mca/filterfw/jni/jni_gl_environment.cpp
+++ b/mca/filterfw/jni/jni_gl_environment.cpp
@@ -46,7 +46,7 @@
}
virtual void Destroy() {
- LOGI("Releasing ANativeWindow!");
+ ALOGI("Releasing ANativeWindow!");
ANativeWindow_release(window_);
}
@@ -135,13 +135,13 @@
jobject surface) {
GLEnv* gl_env = ConvertFromJava<GLEnv>(env, thiz);
if (!surface) {
- LOGE("GLEnvironment: Null Surface passed!");
+ ALOGE("GLEnvironment: Null Surface passed!");
return -1;
} else if (gl_env) {
// Get the ANativeWindow
ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
if (!window) {
- LOGE("GLEnvironment: Error creating window!");
+ ALOGE("GLEnvironment: Error creating window!");
return -1;
}
@@ -165,7 +165,7 @@
eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
if (numConfigs < 1) {
- LOGE("GLEnvironment: No suitable EGL configuration found for surface!");
+ ALOGE("GLEnvironment: No suitable EGL configuration found for surface!");
return -1;
}
@@ -176,7 +176,7 @@
NULL);
if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
- LOGE("GLEnvironment: Error creating window surface!");
+ ALOGE("GLEnvironment: Error creating window surface!");
return -1;
}
@@ -197,13 +197,13 @@
jint height) {
GLEnv* gl_env = ConvertFromJava<GLEnv>(env, thiz);
if (!surface) {
- LOGE("GLEnvironment: Null SurfaceTexture passed!");
+ ALOGE("GLEnvironment: Null SurfaceTexture passed!");
return -1;
} else if (gl_env) {
// Get the ANativeWindow
ANativeWindow* window = ANativeWindow_fromSurface(env, surface);
if (!window) {
- LOGE("GLEnvironment: Error creating window!");
+ ALOGE("GLEnvironment: Error creating window!");
return -1;
}
@@ -234,7 +234,7 @@
eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
if (numConfigs < 1) {
- LOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
+ ALOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
return -1;
}
@@ -245,7 +245,7 @@
NULL);
if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
- LOGE("GLEnvironment: Error creating window surface!");
+ ALOGE("GLEnvironment: Error creating window surface!");
return -1;
}
@@ -277,7 +277,7 @@
// get a native mediarecorder object from the java object
sp<MediaRecorder> mr = getMediaRecorder(env, jmediarecorder);
if (mr == NULL) {
- LOGE("GLEnvironment: Error- MediaRecorder could not be initialized!");
+ ALOGE("GLEnvironment: Error- MediaRecorder could not be initialized!");
return -1;
}
@@ -286,7 +286,7 @@
// over binder calls
sp<ISurfaceTexture> surfaceMS = mr->querySurfaceMediaSourceFromMediaServer();
if (surfaceMS == NULL) {
- LOGE("GLEnvironment: Error- MediaRecorder returned a null \
+ ALOGE("GLEnvironment: Error- MediaRecorder returned a null \
<ISurfaceTexture> handle.");
return -1;
}
@@ -296,7 +296,7 @@
if (window == NULL) {
- LOGE("GLEnvironment: Error creating window!");
+ ALOGE("GLEnvironment: Error creating window!");
return -1;
}
window->incStrong((void*)ANativeWindow_acquire);
@@ -332,7 +332,7 @@
eglChooseConfig(gl_env->display(), configAttribs, &config, 1, &numConfigs);
if (numConfigs < 1) {
- LOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
+ ALOGE("GLEnvironment: No suitable EGL configuration found for surface texture!");
delete winHandle;
return -1;
}
@@ -344,7 +344,7 @@
NULL);
if (GLEnv::CheckEGLError("eglCreateWindowSurface")) {
- LOGE("GLEnvironment: Error creating window surface!");
+ ALOGE("GLEnvironment: Error creating window surface!");
delete winHandle;
return -1;
}
diff --git a/mca/filterfw/jni/jni_native_frame.cpp b/mca/filterfw/jni/jni_native_frame.cpp
index ccc0880..1dfa3e6 100644
--- a/mca/filterfw/jni/jni_native_frame.cpp
+++ b/mca/filterfw/jni/jni_native_frame.cpp
@@ -172,7 +172,7 @@
if (frame && bitmap) {
// Make sure frame size matches bitmap size
if ((size / 4) != (frame->Size() / bytes_per_sample)) {
- LOGE("Size mismatch in native setBitmap()!");
+ ALOGE("Size mismatch in native setBitmap()!");
return JNI_FALSE;
}
@@ -204,7 +204,7 @@
break;
}
default:
- LOGE("Unsupported bytes-per-pixel %d in setBitmap!", bytes_per_sample);
+ ALOGE("Unsupported bytes-per-pixel %d in setBitmap!", bytes_per_sample);
break;
}
return (AndroidBitmap_unlockPixels(env, bitmap) == ANDROID_BITMAP_RESUT_SUCCESS);
@@ -225,7 +225,7 @@
if (result == ANDROID_BITMAP_RESUT_SUCCESS) {
// Make sure frame size matches bitmap size
if ((size / 4) != (frame->Size() / bytes_per_sample)) {
- LOGE("Size mismatch in native getBitmap()!");
+ ALOGE("Size mismatch in native getBitmap()!");
return JNI_FALSE;
}
@@ -256,7 +256,7 @@
break;
}
default:
- LOGE("Unsupported bytes-per-pixel %d in getBitmap!", bytes_per_sample);
+ ALOGE("Unsupported bytes-per-pixel %d in getBitmap!", bytes_per_sample);
break;
}
return (AndroidBitmap_unlockPixels(env, bitmap) == ANDROID_BITMAP_RESUT_SUCCESS);
diff --git a/mca/filterfw/jni/jni_native_program.cpp b/mca/filterfw/jni/jni_native_program.cpp
index c53e67d..b30b769 100644
--- a/mca/filterfw/jni/jni_native_program.cpp
+++ b/mca/filterfw/jni/jni_native_program.cpp
@@ -107,7 +107,7 @@
jstring key,
jstring value) {
if (!value) {
- LOGE("Native Program: Attempting to set null value for key %s!",
+ ALOGE("Native Program: Attempting to set null value for key %s!",
ToCppString(env, key).c_str());
}
NativeProgram* program = ConvertFromJava<NativeProgram>(env, thiz);
@@ -149,7 +149,7 @@
if (input) {
NativeFrame* native_frame = ConvertFromJava<NativeFrame>(env, input);
if (!native_frame) {
- LOGE("NativeProgram: Could not grab NativeFrame input %d!", i);
+ ALOGE("NativeProgram: Could not grab NativeFrame input %d!", i);
return JNI_FALSE;
}
input_data = reinterpret_cast<const char*>(native_frame->Data());
@@ -165,7 +165,7 @@
if (output) {
NativeFrame* output_frame = ConvertFromJava<NativeFrame>(env, output);
if (!output_frame) {
- LOGE("NativeProgram: Could not grab NativeFrame output!");
+ ALOGE("NativeProgram: Could not grab NativeFrame output!");
return JNI_FALSE;
}
output_data = reinterpret_cast<char*>(output_frame->MutableData());
diff --git a/mca/filterfw/jni/jni_shader_program.cpp b/mca/filterfw/jni/jni_shader_program.cpp
index f804874..19f43cd 100644
--- a/mca/filterfw/jni/jni_shader_program.cpp
+++ b/mca/filterfw/jni/jni_shader_program.cpp
@@ -82,7 +82,7 @@
if (c_value.value) {
return ToJBool(program && program->SetUniformValue(c_key, c_value));
} else {
- LOGE("ShaderProgram: Could not convert java object value passed for key '%s'!", c_key.c_str());
+ ALOGE("ShaderProgram: Could not convert java object value passed for key '%s'!", c_key.c_str());
return JNI_FALSE;
}
}
@@ -108,7 +108,7 @@
jobject input = env->GetObjectArrayElement(inputs, i);
const GLFrame* input_frame = ConvertFromJava<GLFrame>(env, input);
if (!input || !input_frame) {
- LOGE("ShaderProgram: invalid input frame %d!", i);
+ ALOGE("ShaderProgram: invalid input frame %d!", i);
return JNI_FALSE;
}
input_frames.push_back(input_frame);
@@ -117,13 +117,13 @@
// Get the output frame
GLFrame* output_frame = ConvertFromJava<GLFrame>(env, output);
if (!output_frame) {
- LOGE("ShaderProgram: no output frame found!");
+ ALOGE("ShaderProgram: no output frame found!");
return JNI_FALSE;
}
// Process the frames!
if (!program->Process(input_frames, output_frame)) {
- LOGE("ShaderProgram: error processing shader!");
+ ALOGE("ShaderProgram: error processing shader!");
return JNI_FALSE;
}
diff --git a/mca/filterfw/jni/jni_util.cpp b/mca/filterfw/jni/jni_util.cpp
index acb0e8a..30c0898 100644
--- a/mca/filterfw/jni/jni_util.cpp
+++ b/mca/filterfw/jni/jni_util.cpp
@@ -55,7 +55,7 @@
if (ref_count_)
++(*ref_count_);
else
- LOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
+ ALOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
}
void JavaObject::Release() {
@@ -65,14 +65,14 @@
if (*ref_count_ == 0) {
JNIEnv* env = GetCurrentJNIEnv();
if (!env)
- LOGE("JavaObject: Releasing outside of Java thread. Will just leak!");
+ ALOGE("JavaObject: Releasing outside of Java thread. Will just leak!");
else if (object_)
env->DeleteGlobalRef(object_);
delete ref_count_;
ref_count_ = NULL;
}
} else {
- LOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
+ ALOGE("JavaObject: Reference count is NULL! JavaObject may be corrupted.");
}
}
diff --git a/mca/filterfw/native/core/geometry.cpp b/mca/filterfw/native/core/geometry.cpp
index efd1946..677b91d 100644
--- a/mca/filterfw/native/core/geometry.cpp
+++ b/mca/filterfw/native/core/geometry.cpp
@@ -129,7 +129,7 @@
}
const Point& Quad::point(int ix) const {
- LOG_ASSERT(ix < static_cast<int>(points_.size()), "Access out of bounds");
+ ALOG_ASSERT(ix < static_cast<int>(points_.size()), "Access out of bounds");
return points_[ix];
}
diff --git a/mca/filterfw/native/core/gl_env.cpp b/mca/filterfw/native/core/gl_env.cpp
index 6bb7e62..b72605c 100644
--- a/mca/filterfw/native/core/gl_env.cpp
+++ b/mca/filterfw/native/core/gl_env.cpp
@@ -71,7 +71,7 @@
// Log error if this did not work
if (CheckEGLError("TearDown!"))
- LOGE("GLEnv: Error tearing down GL Environment!");
+ ALOGE("GLEnv: Error tearing down GL Environment!");
}
bool GLEnv::IsInitialized() const {
@@ -123,7 +123,7 @@
bool GLEnv::InitWithNewContext() {
if (IsInitialized()) {
- LOGE("GLEnv: Attempting to reinitialize environment!");
+ ALOGE("GLEnv: Attempting to reinitialize environment!");
return false;
}
@@ -155,7 +155,7 @@
eglChooseConfig(display(), configAttribs, &config, 1, &numConfigs);
if (numConfigs < 1) {
- LOGE("GLEnv::Init: No suitable EGL configuration found!");
+ ALOGE("GLEnv::Init: No suitable EGL configuration found!");
return false;
}
@@ -296,7 +296,7 @@
bool GLEnv::CheckGLError(const std::string& op) {
bool err = false;
for (GLint error = glGetError(); error; error = glGetError()) {
- LOGE("GL Error: Operation '%s' caused GL error (0x%x)\n",
+ ALOGE("GL Error: Operation '%s' caused GL error (0x%x)\n",
op.c_str(),
error);
err = true;
@@ -309,7 +309,7 @@
for (EGLint error = eglGetError();
error != EGL_SUCCESS;
error = eglGetError()) {
- LOGE("EGL Error: Operation '%s' caused EGL error (0x%x)\n",
+ ALOGE("EGL Error: Operation '%s' caused EGL error (0x%x)\n",
op.c_str(),
error);
err = true;
@@ -324,17 +324,17 @@
error = eglGetError()) {
switch (error) {
case EGL_BAD_DISPLAY:
- LOGE("EGL Error: Attempting to activate context with bad display!");
+ ALOGE("EGL Error: Attempting to activate context with bad display!");
break;
case EGL_BAD_SURFACE:
- LOGE("EGL Error: Attempting to activate context with bad surface!");
+ ALOGE("EGL Error: Attempting to activate context with bad surface!");
break;
case EGL_BAD_ACCESS:
- LOGE("EGL Error: Attempting to activate context, which is "
+ ALOGE("EGL Error: Attempting to activate context, which is "
"already active in another thread!");
break;
default:
- LOGE("EGL Error: Making EGL rendering context current caused "
+ ALOGE("EGL Error: Making EGL rendering context current caused "
"error: 0x%x\n", error);
}
err = true;
@@ -345,7 +345,7 @@
GLuint GLEnv::GetCurrentProgram() {
GLint result;
glGetIntegerv(GL_CURRENT_PROGRAM, &result);
- LOG_ASSERT(result >= 0);
+ ALOG_ASSERT(result >= 0);
return static_cast<GLuint>(result);
}
diff --git a/mca/filterfw/native/core/gl_frame.cpp b/mca/filterfw/native/core/gl_frame.cpp
index 04cc15f..0f8b4a1 100644
--- a/mca/filterfw/native/core/gl_frame.cpp
+++ b/mca/filterfw/native/core/gl_frame.cpp
@@ -284,7 +284,7 @@
if (texture_state_ == kStateUninitialized) {
// Make sure texture not in use already
if (glIsTexture(texture_id_)) {
- LOGE("GLFrame: Cannot generate texture id %d, as it is in use already!", texture_id_);
+ ALOGE("GLFrame: Cannot generate texture id %d, as it is in use already!", texture_id_);
return false;
}
@@ -329,7 +329,7 @@
if (fbo_state_ == kStateUninitialized) {
// Make sure FBO not in use already
if (glIsFramebuffer(fbo_id_)) {
- LOGE("GLFrame: Cannot generate FBO id %d, as it is in use already!", fbo_id_);
+ ALOGE("GLFrame: Cannot generate FBO id %d, as it is in use already!", fbo_id_);
return false;
}
@@ -367,9 +367,9 @@
// and unnecessary (this can only happen if the user is reading out data
// that was just set, and not run through a filter), we warn the user about
// this here.
- LOGW("Warning: Reading pixel data from unfiltered GL frame. This is highly "
- "inefficient. Please consider using your original pixel buffer "
- "instead!");
+ ALOGW("Warning: Reading pixel data from unfiltered GL frame. This is highly "
+ "inefficient. Please consider using your original pixel buffer "
+ "instead!");
// Create source frame set (unfortunately this requires an ugly const-cast,
// as we need to wrap ourselves in a frame-set. Still, as this set is used
@@ -393,7 +393,7 @@
if (fbo_state_ == kStateComplete || texture_state_ == kStateUnmanaged) {
return true;
} else if (fbo_state_ != kStateGenerated) {
- LOGE("Attempting to attach texture to FBO with no FBO in place!");
+ ALOGE("Attempting to attach texture to FBO with no FBO in place!");
return false;
}
diff --git a/mca/filterfw/native/core/native_program.cpp b/mca/filterfw/native/core/native_program.cpp
index e67a58d..c46c46f 100644
--- a/mca/filterfw/native/core/native_program.cpp
+++ b/mca/filterfw/native/core/native_program.cpp
@@ -46,7 +46,7 @@
if (!lib_handle_) {
lib_handle_ = dlopen(lib_name.c_str(), RTLD_NOW);
if (!lib_handle_) {
- LOGE("NativeProgram: Error opening library: '%s': %s", lib_name.c_str(), dlerror());
+ ALOGE("NativeProgram: Error opening library: '%s': %s", lib_name.c_str(), dlerror());
return false;
}
return true;
@@ -59,7 +59,7 @@
return false;
process_function_ = reinterpret_cast<ProcessFunctionPtr>(dlsym(lib_handle_, func_name.c_str()));
if (!process_function_) {
- LOGE("NativeProgram: Could not find process function symbol: '%s'!", func_name.c_str());
+ ALOGE("NativeProgram: Could not find process function symbol: '%s'!", func_name.c_str());
return false;
}
return true;
diff --git a/mca/filterfw/native/core/shader_program.cpp b/mca/filterfw/native/core/shader_program.cpp
index c81bece..d92eb31 100644
--- a/mca/filterfw/native/core/shader_program.cpp
+++ b/mca/filterfw/native/core/shader_program.cpp
@@ -185,13 +185,13 @@
// Abort if program did not successfully compile and link
if (!IsExecutable()) {
- LOGE("ShaderProgram: unexecutable program!");
+ ALOGE("ShaderProgram: unexecutable program!");
return false;
}
// Focus the FBO of the output
if (!output->FocusFrameBuffer()) {
- LOGE("Unable to focus frame buffer");
+ ALOGE("Unable to focus frame buffer");
return false;
}
@@ -205,7 +205,7 @@
const GLuint tex_id = input[i]->GetTextureId();
const GLenum target = input[i]->GetTextureTarget();
if (tex_id == 0) {
- LOGE("ShaderProgram: invalid texture id at input: %d!", i);
+ ALOGE("ShaderProgram: invalid texture id at input: %d!", i);
return false;
}
textures.push_back(tex_id);
@@ -215,7 +215,7 @@
// And render!
if (!RenderFrame(textures, targets)) {
- LOGE("Unable to render frame");
+ ALOGE("Unable to render frame");
return false;
}
return true;
@@ -262,7 +262,7 @@
bool ShaderProgram::CompileAndLink() {
// Make sure we haven't compiled and linked already
if (vertex_shader_ != 0 || fragment_shader_ != 0 || program_ != 0) {
- LOGE("Attempting to re-compile shaders!");
+ ALOGE("Attempting to re-compile shaders!");
return false;
}
@@ -270,7 +270,7 @@
vertex_shader_ = CompileShader(GL_VERTEX_SHADER,
vertex_shader_source_.c_str());
if (!vertex_shader_) {
- LOGE("Shader compilation failed!");
+ ALOGE("Shader compilation failed!");
return false;
}
@@ -293,7 +293,7 @@
ProgramVar pos_coord_attr = glGetAttribLocation(program_, PositionAttributeName().c_str());
manage_coordinates_ = (tex_coord_attr >= 0 && pos_coord_attr >= 0);
} else {
- LOGE("Could not link shader program!");
+ ALOGE("Could not link shader program!");
return false;
}
@@ -315,18 +315,18 @@
glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
if (!compiled) {
// Log the compilation error messages
- LOGE("Problem compiling shader! Source:");
- LOGE("%s", source);
+ ALOGE("Problem compiling shader! Source:");
+ ALOGE("%s", source);
std::string src(source);
unsigned int cur_pos = 0;
unsigned int next_pos = 0;
int line_number = 1;
while ( (next_pos = src.find_first_of('\n', cur_pos)) != std::string::npos) {
- LOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
+ ALOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
cur_pos = next_pos + 1;
line_number++;
}
- LOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
+ ALOGE("%03d : %s", line_number, src.substr(cur_pos, next_pos-cur_pos).c_str());
GLint log_length = 0;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &log_length);
@@ -334,7 +334,7 @@
char* error_log = new char[log_length];
if (error_log) {
glGetShaderInfoLog(shader, log_length, NULL, error_log);
- LOGE("Shader compilation error %d:\n%s\n", shader_type, error_log);
+ ALOGE("Shader compilation error %d:\n%s\n", shader_type, error_log);
delete[] error_log;
}
}
@@ -368,7 +368,7 @@
char* error_log = new char[log_length];
if (error_log) {
glGetProgramInfoLog(program, log_length, NULL, error_log);
- LOGE("Program Linker Error:\n%s\n", error_log);
+ ALOGE("Program Linker Error:\n%s\n", error_log);
delete[] error_log;
}
}
@@ -442,7 +442,7 @@
if (tex_var >= 0) {
glUniform1i(tex_var, i);
} else {
- LOGE("ShaderProgram: Shader does not seem to support %d number of "
+ ALOGE("ShaderProgram: Shader does not seem to support %d number of "
"inputs! Missing uniform 'tex_sampler_%d'!", textures.size(), i);
return false;
}
@@ -467,20 +467,20 @@
const std::vector<GLenum>& targets) {
// Make sure we have enough texture units to accomodate the textures
if (textures.size() > static_cast<unsigned>(MaxTextureUnits())) {
- LOGE("ShaderProgram: Number of input textures is unsupported on this "
+ ALOGE("ShaderProgram: Number of input textures is unsupported on this "
"platform!");
return false;
}
// Prepare to render
if (!BeginDraw()) {
- LOGE("ShaderProgram: couldn't initialize gl for drawing!");
+ ALOGE("ShaderProgram: couldn't initialize gl for drawing!");
return false;
}
// Bind input textures
if (!BindInputTextures(textures, targets)) {
- LOGE("BindInputTextures failed");
+ ALOGE("BindInputTextures failed");
return false;
}
@@ -618,7 +618,7 @@
int components,
int value_size) {
if (expected_count != (value_size / components)) {
- LOGE("Shader Program: %s Value Error (%s): Expected value length %d "
+ ALOGE("Shader Program: %s Value Error (%s): Expected value length %d "
"(%d components), but received length of %d (%d components)!",
var_type.c_str(), var_name.c_str(),
expected_count, components * expected_count,
@@ -633,7 +633,7 @@
int components,
int value_size) {
if (value_size % components != 0) {
- LOGE("Shader Program: %s Value Error (%s): Value must be multiple of %d, "
+ ALOGE("Shader Program: %s Value Error (%s): Value must be multiple of %d, "
"but %d elements were passed!", var_type.c_str(), var_name.c_str(),
components, value_size);
return false;
@@ -643,7 +643,7 @@
bool ShaderProgram::CheckVarValid(ProgramVar var) {
if (!IsVarValid(var)) {
- LOGE("Shader Program: Attempting to access invalid variable!");
+ ALOGE("Shader Program: Attempting to access invalid variable!");
return false;
}
return true;
@@ -652,7 +652,7 @@
// Uniforms ////////////////////////////////////////////////////////////////////
bool ShaderProgram::CheckUniformValid(ProgramVar var) {
if (!IsVarValid(var) || uniform_indices_.find(var) == uniform_indices_.end()) {
- LOGE("Shader Program: Attempting to access unknown uniform %d!", var);
+ ALOGE("Shader Program: Attempting to access unknown uniform %d!", var);
return false;
}
return true;
@@ -669,7 +669,7 @@
ProgramVar ShaderProgram::GetUniform(const std::string& name) const {
if (!IsExecutable()) {
- LOGE("ShaderProgram: Error: Must link program before querying uniforms!");
+ ALOGE("ShaderProgram: Error: Must link program before querying uniforms!");
return -1;
}
return glGetUniformLocation(program_, name.c_str());
@@ -940,10 +940,10 @@
ProgramVar ShaderProgram::GetAttribute(const std::string& name) const {
if (!IsExecutable()) {
- LOGE("ShaderProgram: Error: Must link program before querying attributes!");
+ ALOGE("ShaderProgram: Error: Must link program before querying attributes!");
return -1;
} else if (name == PositionAttributeName() || name == TexCoordAttributeName()) {
- LOGW("ShaderProgram: Attempting to overwrite internal vertex attribute '%s'!", name.c_str());
+ ALOGW("ShaderProgram: Attempting to overwrite internal vertex attribute '%s'!", name.c_str());
}
return glGetAttribLocation(program_, name.c_str());
}
@@ -1014,7 +1014,7 @@
// Make sure the passed data vector has a valid size
if (total % components != 0) {
- LOGE("ShaderProgram: Invalid attribute vector given! Specified a component "
+ ALOGE("ShaderProgram: Invalid attribute vector given! Specified a component "
"count of %d, but passed a non-multiple vector of size %d!",
components, total);
return false;
diff --git a/mca/filterfw/native/core/time_util.cpp b/mca/filterfw/native/core/time_util.cpp
index 4133413..c86c80d 100644
--- a/mca/filterfw/native/core/time_util.cpp
+++ b/mca/filterfw/native/core/time_util.cpp
@@ -63,7 +63,7 @@
mTotalUSec += stopUSec - mStartUSec;
if (mNumCalls % mLoggingPeriodInFrames == 0) {
const float mSec = TotalUSec() * 1.0E-3f / NumCalls();
- LOGE("%s: %f ms", Name().c_str(), mSec);
+ ALOGE("%s: %f ms", Name().c_str(), mSec);
}
}
mStartUSec = 0;
diff --git a/mca/filterfw/native/core/vertex_frame.cpp b/mca/filterfw/native/core/vertex_frame.cpp
index e5e7f01..822573f 100644
--- a/mca/filterfw/native/core/vertex_frame.cpp
+++ b/mca/filterfw/native/core/vertex_frame.cpp
@@ -47,7 +47,7 @@
// Create buffer if not created already
const bool first_upload = !HasVBO();
if (first_upload && !CreateBuffer()) {
- LOGE("VertexFrame: Could not create vertex buffer!");
+ ALOGE("VertexFrame: Could not create vertex buffer!");
return false;
}
@@ -61,7 +61,7 @@
else if (!first_upload && size <= size_)
glBufferSubData(GL_ARRAY_BUFFER, 0, size, data);
else {
- LOGE("VertexFrame: Attempting to upload more data (%d bytes) than fits "
+ ALOGE("VertexFrame: Attempting to upload more data (%d bytes) than fits "
"inside the vertex frame (%d bytes)!", size, size_);
return false;
}
diff --git a/mca/filterpacks/base/native/geometry.cpp b/mca/filterpacks/base/native/geometry.cpp
index d744a0f..7812d50 100644
--- a/mca/filterpacks/base/native/geometry.cpp
+++ b/mca/filterpacks/base/native/geometry.cpp
@@ -128,7 +128,7 @@
}
const Point& Quad::point(int ix) const {
- LOG_ASSERT(ix < static_cast<int>(points_.size()), "Access out of bounds");
+ ALOG_ASSERT(ix < static_cast<int>(points_.size()), "Access out of bounds");
return points_[ix];
}
@@ -137,7 +137,7 @@
const Point& lengths) {
Point dy = vert_axis;
if (!dy.ScaleTo(lengths.y() / 2.0f)) {
- LOGE("Illegal axis: %f %f", vert_axis.x(), vert_axis.y());
+ ALOGE("Illegal axis: %f %f", vert_axis.x(), vert_axis.y());
return false;
}
diff --git a/mca/filterpacks/base/native/time_util.cpp b/mca/filterpacks/base/native/time_util.cpp
index 71ea9f1..1a78a95 100644
--- a/mca/filterpacks/base/native/time_util.cpp
+++ b/mca/filterpacks/base/native/time_util.cpp
@@ -61,7 +61,7 @@
mTotalUSec += stopUSec - mStartUSec;
if (mNumCalls % mLoggingPeriodInFrames == 0) {
const float mSec = TotalUSec() * 1.0E-3f / NumCalls();
- LOGE("%s: %f ms", Name().c_str(), mSec);
+ ALOGE("%s: %f ms", Name().c_str(), mSec);
}
}
mStartUSec = 0;
diff --git a/wilhelm/src/android/AudioPlayer_to_android.cpp b/wilhelm/src/android/AudioPlayer_to_android.cpp
index 2b47b70..57db687 100644
--- a/wilhelm/src/android/AudioPlayer_to_android.cpp
+++ b/wilhelm/src/android/AudioPlayer_to_android.cpp
@@ -448,7 +448,7 @@
SLresult result = EnqueueAsyncCallback_ppi(ap, playCallback, &ap->mPlay.mItf, playContext,
SL_PLAYEVENT_HEADATEND);
if (SL_RESULT_SUCCESS != result) {
- LOGW("Callback %p(%p, %p, SL_PLAYEVENT_HEADATEND) dropped", playCallback,
+ ALOGW("Callback %p(%p, %p, SL_PLAYEVENT_HEADATEND) dropped", playCallback,
&ap->mPlay.mItf, playContext);
}
#endif
@@ -825,7 +825,7 @@
SLresult result = EnqueueAsyncCallback_ppi(ap, callback, &ap->mPlay.mItf,
callbackPContext, event);
if (SL_RESULT_SUCCESS != result) {
- LOGW("Callback %p(%p, %p, 0x%x) dropped", callback,
+ ALOGW("Callback %p(%p, %p, 0x%x) dropped", callback,
&ap->mPlay.mItf, callbackPContext, event);
}
#endif
diff --git a/wilhelm/src/android/MediaPlayer_to_android.cpp b/wilhelm/src/android/MediaPlayer_to_android.cpp
index dedb854..c204faf 100644
--- a/wilhelm/src/android/MediaPlayer_to_android.cpp
+++ b/wilhelm/src/android/MediaPlayer_to_android.cpp
@@ -142,7 +142,7 @@
/*i2*/ 1 /*streamIndex, only one stream supported here, 0 is reserved*/,
/*p2*/ NULL /*pEventData, always NULL in OpenMAX AL 1.0.1*/,
/*p3*/ callbackPContext /*pContext*/);
- LOGW_IF(SL_RESULT_SUCCESS != res,
+ ALOGW_IF(SL_RESULT_SUCCESS != res,
"Callback %p(%p, XA_STREAMCBEVENT_PROPERTYCHANGE, 1, NULL, %p) dropped",
callback, &mp->mStreamInfo.mItf, callbackPContext);
#endif
@@ -172,7 +172,7 @@
#else
SLresult res = EnqueueAsyncCallback_ppi(mp, playCallback, &mp->mPlay.mItf, playContext,
XA_PLAYEVENT_HEADATEND);
- LOGW_IF(SL_RESULT_SUCCESS != res,
+ ALOGW_IF(SL_RESULT_SUCCESS != res,
"Callback %p(%p, %p, SL_PLAYEVENT_HEADATEND) dropped", playCallback,
&mp->mPlay.mItf, playContext);
#endif
diff --git a/wilhelm/src/android/VideoCodec_to_android.cpp b/wilhelm/src/android/VideoCodec_to_android.cpp
index 20aad28..01c3af2 100644
--- a/wilhelm/src/android/VideoCodec_to_android.cpp
+++ b/wilhelm/src/android/VideoCodec_to_android.cpp
@@ -65,7 +65,7 @@
sp<IOMX> omx(service->getOMX());
if (omx.get() == NULL) {
- LOGE("android_videoCodec_expose() couldn't access OMX interface");
+ ALOGE("android_videoCodec_expose() couldn't access OMX interface");
return false;
}
diff --git a/wilhelm/src/android/android_AudioSfDecoder.cpp b/wilhelm/src/android/android_AudioSfDecoder.cpp
index 5908189..1a50ccb 100644
--- a/wilhelm/src/android/android_AudioSfDecoder.cpp
+++ b/wilhelm/src/android/android_AudioSfDecoder.cpp
@@ -696,7 +696,7 @@
// fill level is ratio of how much has been played + how much is
// cached, divided by total duration
- uint32_t currentPositionUsec = getPositionUsec();
+ int64_t currentPositionUsec = getPositionUsec();
if (currentPositionUsec == ANDROID_UNKNOWN_TIME) {
// if we don't know where we are, assume the worst for the fill ratio
currentPositionUsec = 0;
diff --git a/wilhelm/src/android/android_GenericMediaPlayer.cpp b/wilhelm/src/android/android_GenericMediaPlayer.cpp
index f3cebf5..1931bb9 100644
--- a/wilhelm/src/android/android_GenericMediaPlayer.cpp
+++ b/wilhelm/src/android/android_GenericMediaPlayer.cpp
@@ -542,7 +542,7 @@
// now that we know the channel count, re-calculate the volumes
notify(PLAYEREVENT_CHANNEL_COUNT, channelCount, true /*async*/);
} else {
- LOGW("channel count is still unknown after prepare");
+ ALOGW("channel count is still unknown after prepare");
}
delete reply;
// retrieve duration
diff --git a/wilhelm/src/android/android_GenericMediaPlayer.h b/wilhelm/src/android/android_GenericMediaPlayer.h
index 3e8fe81..8ef66b2 100644
--- a/wilhelm/src/android/android_GenericMediaPlayer.h
+++ b/wilhelm/src/android/android_GenericMediaPlayer.h
@@ -120,7 +120,7 @@
// Receives notifications about death of media.player service
const sp<MediaPlayerDeathNotifier> mPlayerDeathNotifier;
- // Return a reference to the media player service, or LOGE and return NULL after retries fail
+ // Return a reference to the media player service, or ALOGE and return NULL after retries fail
static const sp<IMediaPlayerService> getMediaPlayerService() {
return IMediaDeathNotifier::getMediaPlayerService();
}
diff --git a/wilhelm/src/android/android_GenericPlayer.h b/wilhelm/src/android/android_GenericPlayer.h
index d3206a1..bc52846 100644
--- a/wilhelm/src/android/android_GenericPlayer.h
+++ b/wilhelm/src/android/android_GenericPlayer.h
@@ -60,22 +60,22 @@
GenericPlayer(const AudioPlayback_Parameters* params);
virtual ~GenericPlayer();
- virtual void init(const notif_cbf_t cbf, void* notifUser);
+ void init(const notif_cbf_t cbf, void* notifUser);
virtual void preDestroy();
void setDataSource(const char *uri);
void setDataSource(int fd, int64_t offset, int64_t length, bool closeAfterUse = false);
- void prepare();
+ void prepare();
virtual void play();
- virtual void pause();
- virtual void stop();
+ void pause();
+ void stop();
// timeMsec must be >= 0 or == ANDROID_UNKNOWN_TIME (used by StreamPlayer after discontinuity)
- virtual void seek(int64_t timeMsec);
- virtual void loop(bool loop);
- virtual void setBufferingUpdateThreshold(int16_t thresholdPercent);
+ void seek(int64_t timeMsec);
+ void loop(bool loop);
+ void setBufferingUpdateThreshold(int16_t thresholdPercent);
- virtual void getDurationMsec(int* msec); //msec != NULL, ANDROID_UNKNOWN_TIME if unknown
+ void getDurationMsec(int* msec); //msec != NULL, ANDROID_UNKNOWN_TIME if unknown
virtual void getPositionMsec(int* msec) = 0; //msec != NULL, ANDROID_UNKNOWN_TIME if unknown
virtual void setVideoSurfaceTexture(const sp<ISurfaceTexture> &surfaceTexture) {}
diff --git a/wilhelm/src/sles_allinclusive.h b/wilhelm/src/sles_allinclusive.h
index 0b33dcb..a202242 100644
--- a/wilhelm/src/sles_allinclusive.h
+++ b/wilhelm/src/sles_allinclusive.h
@@ -442,7 +442,7 @@
// SLresult result = EnqueueAsyncCallback_ppi(ap, playCallback, &ap->mPlay.mItf, playContext,
// SL_PLAYEVENT_HEADATEND);
// if (SL_RESULT_SUCCESS != result) {
-// LOGW("Callback %p(%p, %p, SL_PLAYEVENT_HEADATEND) dropped", playCallback, &ap->mPlay.mItf,
+// ALOGW("Callback %p(%p, %p, SL_PLAYEVENT_HEADATEND) dropped", playCallback, &ap->mPlay.mItf,
// playContext);
// }
// which replaces:
diff --git a/wilhelm/tests/native-media/jni/native-media-jni.c b/wilhelm/tests/native-media/jni/native-media-jni.c
index 6c5a283..a43cb9e 100644
--- a/wilhelm/tests/native-media/jni/native-media-jni.c
+++ b/wilhelm/tests/native-media/jni/native-media-jni.c
@@ -248,7 +248,7 @@
XAVideoStreamInformation videoInfo;
res = (*caller)->QueryStreamInformation(caller, streamIndex, &videoInfo);
assert(XA_RESULT_SUCCESS == res);
- LOGI("Found video size %u x %u, codec ID=%u, frameRate=%u, bitRate=%u, duration=%u ms",
+ ALOGI("Found video size %u x %u, codec ID=%u, frameRate=%u, bitRate=%u, duration=%u ms",
videoInfo.width, videoInfo.height, videoInfo.codecId, videoInfo.frameRate,
videoInfo.bitRate, videoInfo.duration);
} break;
@@ -301,7 +301,7 @@
nbRead = fread(dataCache, BUFFER_SIZE, NB_BUFFERS, file);
if (nbRead <= 0) {
// could be premature EOF or I/O error
- LOGE("Error filling cache, exiting\n");
+ ALOGE("Error filling cache, exiting\n");
return JNI_FALSE;
}
assert(1 <= nbRead && nbRead <= NB_BUFFERS);
@@ -349,7 +349,7 @@
// open the file to play
file = fopen(utf8, "rb");
if (file == NULL) {
- LOGE("Failed to open %s", utf8);
+ ALOGE("Failed to open %s", utf8);
return JNI_FALSE;
}
diff --git a/wilhelm/tests/sandbox/playbq.c b/wilhelm/tests/sandbox/playbq.c
index aaa72f1..c0f71a7 100644
--- a/wilhelm/tests/sandbox/playbq.c
+++ b/wilhelm/tests/sandbox/playbq.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include <SLES/OpenSLES.h>
@@ -30,6 +31,9 @@
#include <sndfile.h>
#endif
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
unsigned numBuffers = 2;
int framesPerBuffer = 512;
SNDFILE *sndfile;
@@ -114,14 +118,18 @@
byteOrder = nativeByteOrder;
SLboolean enableReverb = SL_BOOLEAN_FALSE;
- SLpermille rate = 1000;
+ SLpermille initialRate = 0;
+ SLpermille finalRate = 0;
+ SLpermille deltaRate = 1;
+ SLmillisecond deltaRateMs = 0;
// process command-line options
int i;
for (i = 1; i < argc; ++i) {
char *arg = argv[i];
- if (arg[0] != '-')
+ if (arg[0] != '-') {
break;
+ }
if (!strcmp(arg, "-b")) {
byteOrder = SL_BYTEORDER_BIGENDIAN;
} else if (!strcmp(arg, "-l")) {
@@ -133,7 +141,17 @@
} else if (!strncmp(arg, "-n", 2)) {
numBuffers = atoi(&arg[2]);
} else if (!strncmp(arg, "-p", 2)) {
- rate = atoi(&arg[2]);
+ initialRate = atoi(&arg[2]);
+ } else if (!strncmp(arg, "-P", 2)) {
+ finalRate = atoi(&arg[2]);
+ } else if (!strncmp(arg, "-q", 2)) {
+ deltaRate = atoi(&arg[2]);
+ // deltaRate is a magnitude, so take absolute value
+ if (deltaRate < 0) {
+ deltaRate = -deltaRate;
+ }
+ } else if (!strncmp(arg, "-Q", 2)) {
+ deltaRateMs = atoi(&arg[2]);
} else if (!strcmp(arg, "-r")) {
enableReverb = SL_BOOLEAN_TRUE;
} else {
@@ -143,6 +161,16 @@
if (argc - i != 1) {
fprintf(stderr, "usage: [-b/l] [-8] [-f#] [-n#] [-p#] [-r] %s filename\n", argv[0]);
+ fprintf(stderr, " -b force big-endian byte order (default is native byte order)\n");
+ fprintf(stderr, " -l force little-endian byte order (default is native byte order)\n");
+ fprintf(stderr, " -8 output 8-bits per sample (default is 16-bits per sample)\n");
+ fprintf(stderr, " -f# frames per buffer (default 512)\n");
+ fprintf(stderr, " -n# number of buffers (default 2)\n");
+ fprintf(stderr, " -p# initial playback rate in per mille (default 1000)\n");
+ fprintf(stderr, " -P# final playback rate in per mille (default same as -p#)\n");
+ fprintf(stderr, " -q# magnitude of playback rate changes in per mille (default 1)\n");
+ fprintf(stderr, " -Q# period between playback rate changes in ms (default 50)\n");
+ fprintf(stderr, " -r enable reverb (default disabled)\n");
return EXIT_FAILURE;
}
@@ -162,8 +190,9 @@
break;
default:
fprintf(stderr, "unsupported channel count %d\n", sfinfo.channels);
- break;
+ goto close_sndfile;
}
+
switch (sfinfo.samplerate) {
case 8000:
case 11025:
@@ -177,15 +206,17 @@
break;
default:
fprintf(stderr, "unsupported sample rate %d\n", sfinfo.samplerate);
- break;
+ goto close_sndfile;
}
+
switch (sfinfo.format & SF_FORMAT_TYPEMASK) {
case SF_FORMAT_WAV:
break;
default:
fprintf(stderr, "unsupported format type 0x%x\n", sfinfo.format & SF_FORMAT_TYPEMASK);
- break;
+ goto close_sndfile;
}
+
switch (sfinfo.format & SF_FORMAT_SUBMASK) {
case SF_FORMAT_PCM_16:
case SF_FORMAT_PCM_U8:
@@ -195,7 +226,7 @@
break;
default:
fprintf(stderr, "unsupported sub-format 0x%x\n", sfinfo.format & SF_FORMAT_SUBMASK);
- break;
+ goto close_sndfile;
}
buffers = (short *) malloc(framesPerBuffer * sfinfo.channels * sizeof(short) * numBuffers);
@@ -264,7 +295,10 @@
SLObjectItf playerObject;
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &playerObject, &audioSrc,
&audioSnk, enableReverb ? 3 : 2, ids2, req2);
- assert(SL_RESULT_SUCCESS == result);
+ if (SL_RESULT_SUCCESS != result) {
+ fprintf(stderr, "can't create audio player\n");
+ goto no_player;
+ }
// realize the player
result = (*playerObject)->Realize(playerObject, SL_BOOLEAN_FALSE);
@@ -291,14 +325,29 @@
result = (*playerPlaybackRate)->GetProperties(playerPlaybackRate, &defaultProperties);
assert(SL_RESULT_SUCCESS == result);
printf("default playback rate %d per mille, properties 0x%x\n", defaultRate, defaultProperties);
- if (rate != defaultRate) {
- result = (*playerPlaybackRate)->SetRate(playerPlaybackRate, rate);
+ if (initialRate <= 0) {
+ initialRate = defaultRate;
+ }
+ if (finalRate <= 0) {
+ finalRate = initialRate;
+ }
+ SLpermille currentRate = defaultRate;
+ if (finalRate == initialRate) {
+ deltaRate = 0;
+ } else if (finalRate < initialRate) {
+ deltaRate = -deltaRate;
+ }
+ if (initialRate != defaultRate) {
+ result = (*playerPlaybackRate)->SetRate(playerPlaybackRate, initialRate);
if (SL_RESULT_FEATURE_UNSUPPORTED == result) {
- fprintf(stderr, "playback rate %d is unsupported\n", rate);
+ fprintf(stderr, "initial playback rate %d is unsupported\n", initialRate);
+ deltaRate = 0;
} else if (SL_RESULT_PARAMETER_INVALID == result) {
- fprintf(stderr, "playback rate %d is invalid", rate);
+ fprintf(stderr, "initial playback rate %d is invalid\n", initialRate);
+ deltaRate = 0;
} else {
assert(SL_RESULT_SUCCESS == result);
+ currentRate = initialRate;
}
}
@@ -336,8 +385,9 @@
result = (*playerBufferQueue)->Enqueue(playerBufferQueue, buffer, nbytes);
assert(SL_RESULT_SUCCESS == result);
}
- if (which >= numBuffers)
+ if (which >= numBuffers) {
which = 0;
+ }
// register a callback on the buffer queue
result = (*playerBufferQueue)->RegisterCallback(playerBufferQueue, callback, NULL);
@@ -347,6 +397,12 @@
result = (*playerPlay)->SetPlayState(playerPlay, SL_PLAYSTATE_PLAYING);
assert(SL_RESULT_SUCCESS == result);
+ // get the initial time
+ struct timespec prevTs;
+ clock_gettime(CLOCK_MONOTONIC, &prevTs);
+ long elapsedNs = 0;
+ long deltaRateNs = deltaRateMs * 1000000;
+
// wait until the buffer queue is empty
SLBufferQueueState bufqstate;
for (;;) {
@@ -355,17 +411,54 @@
if (0 >= bufqstate.count) {
break;
}
- sleep(1);
+ if (deltaRate == 0) {
+ sleep(1);
+ } else {
+ struct timespec curTs;
+ clock_gettime(CLOCK_MONOTONIC, &curTs);
+ elapsedNs += (curTs.tv_sec - prevTs.tv_sec) * 1000000000 +
+ // this term can be negative
+ (curTs.tv_nsec - prevTs.tv_nsec);
+ prevTs = curTs;
+ if (elapsedNs < deltaRateNs) {
+ usleep((deltaRateNs - elapsedNs) / 1000);
+ continue;
+ }
+ elapsedNs -= deltaRateNs;
+ SLpermille nextRate = currentRate + deltaRate;
+ result = (*playerPlaybackRate)->SetRate(playerPlaybackRate, nextRate);
+ if (SL_RESULT_SUCCESS != result) {
+ fprintf(stderr, "next playback rate %d is unsupported\n", nextRate);
+ } else if (SL_RESULT_PARAMETER_INVALID == result) {
+ fprintf(stderr, "next playback rate %d is invalid\n", nextRate);
+ } else {
+ assert(SL_RESULT_SUCCESS == result);
+ }
+ currentRate = nextRate;
+ if (currentRate >= max(initialRate, finalRate)) {
+ currentRate = max(initialRate, finalRate);
+ deltaRate = -abs(deltaRate);
+ } else if (currentRate <= min(initialRate, finalRate)) {
+ currentRate = min(initialRate, finalRate);
+ deltaRate = abs(deltaRate);
+ }
+ }
}
// destroy audio player
(*playerObject)->Destroy(playerObject);
+no_player:
+
// destroy output mix
(*outputMixObject)->Destroy(outputMixObject);
// destroy engine
(*engineObject)->Destroy(engineObject);
+close_sndfile:
+
+ (void) sf_close(sndfile);
+
return EXIT_SUCCESS;
}