Skip to content

Commit

Permalink
Move reset() out of the audio thread.
Browse files Browse the repository at this point in the history
It doesn need to be there, and could possibly starve other threads
since the audio thread is realtime.
---
 remotepluginclient.cpp |    2 +-
 remotepluginserver.cpp |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
  • Loading branch information
kramlie committed Sep 20, 2011
1 parent 220936d commit 7029311
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion remotepluginclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ RemotePluginClient::setSampleRate(int s)
void
RemotePluginClient::reset()
{
writeOpcode(m_processFd, RemotePluginReset);
writeOpcode(m_controlRequestFd, RemotePluginReset);
if (m_shmSize > 0) {
memset(m_shm, 0, m_shmSize);
}
Expand Down
8 changes: 4 additions & 4 deletions remotepluginserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,6 @@ RemotePluginServer::dispatchProcessEvents()
setSampleRate(readInt(m_processFd));
break;

case RemotePluginReset:
reset();
break;

default:
std::cerr << "WARNING: RemotePluginServer::dispatchProcessEvents: unexpected opcode "
<< opcode << std::endl;
Expand Down Expand Up @@ -448,6 +444,10 @@ RemotePluginServer::dispatchControlEvents()
case RemotePluginNoOpcode:
break;

case RemotePluginReset:
reset();
break;

default:
std::cerr << "WARNING: RemotePluginServer::dispatchControlEvents: unexpected opcode "
<< opcode << std::endl;
Expand Down

0 comments on commit 7029311

Please sign in to comment.