[Scummvm-cvs-logs] scummvm master -> 9e7ee4953ec5ca41a30c178ce778149a86f07b8f
dhewg
dhewg at wiibrew.org
Mon Mar 14 20:33:31 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f706b1568d ANDROID: Cleanup
9e7ee4953e ANDROID: Halve the audio buffer size
Commit: f706b1568d286bb2c145046e4d3f04f6ee177314
https://github.com/scummvm/scummvm/commit/f706b1568d286bb2c145046e4d3f04f6ee177314
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-14T12:10:41-07:00
Commit Message:
ANDROID: Cleanup
Removed not required checks since we now buffer texture contents
Changed paths:
backends/platform/android/texture.cpp
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 87a8c2e..691c384 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -103,22 +103,15 @@ GLESBaseTexture::~GLESBaseTexture() {
void GLESBaseTexture::release() {
LOGD("Destroying texture %u", _texture_name);
+
GLCALL(glDeleteTextures(1, &_texture_name));
+ _texture_name = 0;
}
void GLESBaseTexture::reinit() {
GLCALL(glGenTextures(1, &_texture_name));
- if (hasPalette()) {
- // paletted textures are in a local buffer, don't wipe it
- initSize();
- } else {
- // bypass allocBuffer() shortcut to reinit the texture properly
- _texture_width = 0;
- _texture_height = 0;
-
- allocBuffer(_surface.w, _surface.h);
- }
+ initSize();
setDirty();
}
@@ -154,8 +147,7 @@ void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) {
_surface.h = h;
_surface.bytesPerPixel = _pixelFormat.bytesPerPixel;
- // Already allocated a sufficiently large buffer?
- if (w <= _texture_width && h <= _texture_height)
+ if (w == _texture_width && h == _texture_height)
return;
if (npot_supported) {
Commit: 9e7ee4953ec5ca41a30c178ce778149a86f07b8f
https://github.com/scummvm/scummvm/commit/9e7ee4953ec5ca41a30c178ce778149a86f07b8f
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-14T12:26:35-07:00
Commit Message:
ANDROID: Halve the audio buffer size
Also, run into the blocking audio write without sleep. This hopefully
fixes audio hickups on slow devices.
Changed paths:
backends/platform/android/android.cpp
backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 7731c53..72810b6 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -286,9 +286,7 @@ void *OSystem_Android::audioThreadFunc(void *arg) {
if (written < 0)
break;
- // sleep a little, prepare the next buffer, and run into the
- // blocking AudioTrack.write
- nanosleep(&tv_delay, 0);
+ // prepare the next buffer, and run into the blocking AudioTrack.write
}
JNI::setAudioStop();
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
index 0bc5f3c..dfb5855 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
@@ -245,8 +245,8 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.ENCODING_PCM_16BIT);
- // ~100ms
- int buffer_size_want = (_sample_rate * 2 * 2 / 10) & ~1023;
+ // ~50ms
+ int buffer_size_want = (_sample_rate * 2 * 2 / 20) & ~1023;
if (_buffer_size < buffer_size_want) {
Log.w(LOG_TAG, String.format(
More information about the Scummvm-git-logs
mailing list