summaryrefslogtreecommitdiffstats
path: root/voip/jni/rtp/AudioGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'voip/jni/rtp/AudioGroup.cpp')
-rw-r--r--voip/jni/rtp/AudioGroup.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp
index 8f968ff..4db5738 100644
--- a/voip/jni/rtp/AudioGroup.cpp
+++ b/voip/jni/rtp/AudioGroup.cpp
@@ -510,7 +510,7 @@ private:
bool start()
{
if (run("Network", ANDROID_PRIORITY_AUDIO) != NO_ERROR) {
- LOGE("cannot start network thread");
+ ALOGE("cannot start network thread");
return false;
}
return true;
@@ -530,7 +530,7 @@ private:
bool start()
{
if (run("Device", ANDROID_PRIORITY_AUDIO) != NO_ERROR) {
- LOGE("cannot start device thread");
+ ALOGE("cannot start device thread");
return false;
}
return true;
@@ -573,7 +573,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
{
mEventQueue = epoll_create(2);
if (mEventQueue == -1) {
- LOGE("epoll_create: %s", strerror(errno));
+ ALOGE("epoll_create: %s", strerror(errno));
return false;
}
@@ -583,7 +583,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
// Create device socket.
int pair[2];
if (socketpair(AF_UNIX, SOCK_DGRAM, 0, pair)) {
- LOGE("socketpair: %s", strerror(errno));
+ ALOGE("socketpair: %s", strerror(errno));
return false;
}
mDeviceSocket = pair[0];
@@ -593,7 +593,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
if (!mChain->set(AudioStream::NORMAL, pair[1], NULL, NULL,
sampleRate, sampleCount, -1, -1)) {
close(pair[1]);
- LOGE("cannot initialize device stream");
+ ALOGE("cannot initialize device stream");
return false;
}
@@ -602,7 +602,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
tv.tv_sec = 0;
tv.tv_usec = 1000 * sampleCount / sampleRate * 500;
if (setsockopt(pair[0], SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) {
- LOGE("setsockopt: %s", strerror(errno));
+ ALOGE("setsockopt: %s", strerror(errno));
return false;
}
@@ -611,7 +611,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
event.events = EPOLLIN;
event.data.ptr = mChain;
if (epoll_ctl(mEventQueue, EPOLL_CTL_ADD, pair[1], &event)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
@@ -675,7 +675,7 @@ bool AudioGroup::add(AudioStream *stream)
event.events = EPOLLIN;
event.data.ptr = stream;
if (epoll_ctl(mEventQueue, EPOLL_CTL_ADD, stream->mSocket, &event)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
@@ -699,7 +699,7 @@ bool AudioGroup::remove(int socket)
AudioStream *target = stream->mNext;
if (target->mSocket == socket) {
if (epoll_ctl(mEventQueue, EPOLL_CTL_DEL, socket, NULL)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
stream->mNext = target->mNext;
@@ -749,7 +749,7 @@ bool AudioGroup::NetworkThread::threadLoop()
epoll_event events[count];
count = epoll_wait(mGroup->mEventQueue, events, count, deadline);
if (count == -1) {
- LOGE("epoll_wait: %s", strerror(errno));
+ ALOGE("epoll_wait: %s", strerror(errno));
return false;
}
for (int i = 0; i < count; ++i) {
@@ -792,7 +792,7 @@ bool AudioGroup::DeviceThread::threadLoop()
sampleRate) != NO_ERROR || output <= 0 ||
AudioRecord::getMinFrameCount(&input, sampleRate,
AUDIO_FORMAT_PCM_16_BIT, 1) != NO_ERROR || input <= 0) {
- LOGE("cannot compute frame count");
+ ALOGE("cannot compute frame count");
return false;
}
ALOGD("reported frame count: output %d, input %d", output, input);
@@ -812,7 +812,7 @@ bool AudioGroup::DeviceThread::threadLoop()
AUDIO_CHANNEL_OUT_MONO, output) != NO_ERROR || record.set(
AUDIO_SOURCE_VOICE_COMMUNICATION, sampleRate, AUDIO_FORMAT_PCM_16_BIT,
AUDIO_CHANNEL_IN_MONO, input) != NO_ERROR) {
- LOGE("cannot initialize audio device");
+ ALOGE("cannot initialize audio device");
return false;
}
ALOGD("latency: output %d, input %d", track.latency(), record.latency());
@@ -884,7 +884,7 @@ bool AudioGroup::DeviceThread::threadLoop()
toWrite -= buffer.frameCount;
track.releaseBuffer(&buffer);
} else if (status != TIMED_OUT && status != WOULD_BLOCK) {
- LOGE("cannot write to AudioTrack");
+ ALOGE("cannot write to AudioTrack");
goto exit;
}
}
@@ -900,7 +900,7 @@ bool AudioGroup::DeviceThread::threadLoop()
toRead -= buffer.frameCount;
record.releaseBuffer(&buffer);
} else if (status != TIMED_OUT && status != WOULD_BLOCK) {
- LOGE("cannot read from AudioRecord");
+ ALOGE("cannot read from AudioRecord");
goto exit;
}
}
@@ -1051,7 +1051,7 @@ int registerAudioGroup(JNIEnv *env)
{
gRandom = open("/dev/urandom", O_RDONLY);
if (gRandom == -1) {
- LOGE("urandom: %s", strerror(errno));
+ ALOGE("urandom: %s", strerror(errno));
return -1;
}
@@ -1060,7 +1060,7 @@ int registerAudioGroup(JNIEnv *env)
(gNative = env->GetFieldID(clazz, "mNative", "I")) == NULL ||
(gMode = env->GetFieldID(clazz, "mMode", "I")) == NULL ||
env->RegisterNatives(clazz, gMethods, NELEM(gMethods)) < 0) {
- LOGE("JNI registration failed");
+ ALOGE("JNI registration failed");
return -1;
}
return 0;