Fixed audio not playing, it still works only for Android 2.1 - 1.6 fails for unknown reason

This commit is contained in:
pelya
2010-06-10 14:19:17 +03:00
parent 91333e8bd4
commit 3d66cd911a
2 changed files with 35 additions and 31 deletions

View File

@@ -14,6 +14,7 @@ import android.media.AudioManager;
import android.media.AudioFormat;
import java.io.*;
import java.nio.ByteBuffer;
import android.util.Log;
class AudioThread {
@@ -21,7 +22,6 @@ class AudioThread {
private Activity mParent;
private AudioTrack mAudio;
private byte[] mAudioBuffer;
private ByteBuffer mAudioBufferNative;
public AudioThread(Activity parent)
{
@@ -50,6 +50,7 @@ class AudioThread {
bufSize = AudioTrack.getMinBufferSize( rate, channels, encoding );
mAudioBuffer = new byte[bufSize];
mAudio = new AudioTrack(AudioManager.STREAM_MUSIC,
rate,
channels,