int threadFunc(void* func) {
pid_t tid = androidGetTid();
androidSetThreadPriority(tid, ANDROID_PRIORITY_AUDIO);
while(1) {
......
}
}
通过上面的代码可以设置framework层C++的线程 优先级。参考:AudioTrack.cpp
int threadFunc(void* func) {
pid_t tid = androidGetTid();
androidSetThreadPriority(tid, ANDROID_PRIORITY_AUDIO);
while(1) {
......
}
}
通过上面的代码可以设置framework层C++的线程 优先级。参考:AudioTrack.cpp