урок 130
Добавлено: 23 окт 2015, 16:27
Почему в 130 уроке функция
не читает данные в буфер Log.d(TAG, "readCount = " + readCount + ", totalCount = "
+ totalCount); выводит нули как исправить код??
Код: Выделить всё
public void readStart(View v) {
Log.d(TAG, "read start");
isReading = true;
new Thread(new Runnable() {
@Override
public void run() {
if (audioRecord == null)
return;
byte[] myBuffer = new byte[myBufferSize];
int readCount = 0;
int totalCount = 0;
while (isReading) {
readCount = audioRecord.read(myBuffer, 0, myBufferSize);
totalCount += readCount;
Log.d(TAG, "readCount = " + readCount + ", totalCount = "
+ totalCount);
}
}
}).start();
}
+ totalCount); выводит нули как исправить код??