void PulsePlugin::resumeStream(AudioStream *audioStream) { PulseAudioStream *pulseStream = NULL; pulseStream = static_cast<PulseAudioStream *> ( audioStream ); if(pulseStream->isValid() && pulseStream->paused()) { pa_stream_cork(pulseStream->stream, 0, NULL, NULL); //This will restart time pulseStream->pause=false; } }
void PulsePlugin::pauseStream(AudioStream *audioStream) { PulseAudioStream *pulseStream = NULL; pulseStream = static_cast<PulseAudioStream *> ( audioStream ); if(pulseStream->isValid() && !pulseStream->paused()) { pa_stream_cork(pulseStream->stream, 1, NULL, NULL); //This will stop the stream's time from running pulseStream->pause=true; } }