Commit 64117951 authored by sletz's avatar sletz
Browse files

Correct alsa_driver_restart (thanks Devin Anderson).

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4222 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 92d88530
......@@ -37,6 +37,7 @@ Valerio Pilo
2011-03-24 Stephane Letz <letz@grame.fr>
* Implement renaming in JackDriver::Open to avoid name collision (thanks Devin Anderson).
* Correct alsa_driver_restart (thanks Devin Anderson).
2011-03-23 Stephane Letz <letz@grame.fr>
......
......@@ -1048,6 +1048,14 @@ void SetTime(jack_time_t time)
g_alsa_driver->SetTimetAux(time);
}
int Restart()
{
int res;
if ((res = g_alsa_driver->Stop()) == 0)
res = g_alsa_driver->Start();
return res;
}
#ifdef __cplusplus
}
#endif
......
......@@ -1159,8 +1159,12 @@ alsa_driver_restart (alsa_driver_t *driver)
int res;
driver->xrun_recovery = 1;
// JACK2
/*
if ((res = driver->nt_stop((struct _jack_driver_nt *) driver))==0)
res = driver->nt_start((struct _jack_driver_nt *) driver);
*/
res = Restart();
driver->xrun_recovery = 0;
if (res && driver->midi)
......
......@@ -278,6 +278,7 @@ void MonitorInput();
void ClearOutput();
void WriteOutput(jack_nframes_t orig_nframes, snd_pcm_sframes_t contiguous, snd_pcm_sframes_t nwritten);
void SetTime(jack_time_t time);
int Restart();
#ifdef __cplusplus
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment