Commit b6f5e66d authored by Stephane Letz's avatar Stephane Letz
Browse files

Improve JackPortAudioDriver::Stop.

parent fe906854
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp Audio Adapter for Windows\0" VALUE "FileDescription", "Jackmp Audio Adapter for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "audioadapter\0" VALUE "InternalName", "audioadapter\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "audioadapter.dll\0" VALUE "OriginalFilename", "audioadapter.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jack server for Windows\0" VALUE "FileDescription", "Jack server for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jackd\0" VALUE "InternalName", "jackd\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jackd.exe\0" VALUE "OriginalFilename", "jackd.exe\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp Dummy Driver for Windows\0" VALUE "FileDescription", "Jackmp Dummy Driver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_dummy\0" VALUE "InternalName", "jack_dummy\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_dummy.dll\0" VALUE "OriginalFilename", "jack_dummy.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp Loopback Driver for Windows\0" VALUE "FileDescription", "Jackmp Loopback Driver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_loopback\0" VALUE "InternalName", "jack_loopback\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_loopback.dll\0" VALUE "OriginalFilename", "jack_loopback.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -22,10 +22,10 @@ BEGIN ...@@ -22,10 +22,10 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "\0" VALUE "Comments", "\0"
VALUE "CompanyName", "Grame\0" VALUE "CompanyName", "Grame\0"
VALUE "FileDescription", "Jackmp Net Adapter for Windows\0" VALUE "FileDescription", "Jackmp NetAdapter for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "netadapter\0" VALUE "InternalName", "netadapter\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "netadapter.dll\0" VALUE "OriginalFilename", "netadapter.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -22,10 +22,10 @@ BEGIN ...@@ -22,10 +22,10 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "\0" VALUE "Comments", "\0"
VALUE "CompanyName", "Grame\0" VALUE "CompanyName", "Grame\0"
VALUE "FileDescription", "Jackmp Net Driver for Windows\0" VALUE "FileDescription", "Jackmp NetDriver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_netdriver\0" VALUE "InternalName", "jack_netdriver\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_netdriver.dll\0" VALUE "OriginalFilename", "jack_netdriver.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -22,10 +22,10 @@ BEGIN ...@@ -22,10 +22,10 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "\0" VALUE "Comments", "\0"
VALUE "CompanyName", "Grame\0" VALUE "CompanyName", "Grame\0"
VALUE "FileDescription", "Jackmp Net Manager for Windows\0" VALUE "FileDescription", "Jackmp NetManager for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "netmanager\0" VALUE "InternalName", "netmanager\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "netmanager.dll\0" VALUE "OriginalFilename", "netmanager.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp NetOne Driver for Windows\0" VALUE "FileDescription", "Jackmp NetOne Driver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_netonedriver\0" VALUE "InternalName", "jack_netonedriver\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_netonedriver.dll\0" VALUE "OriginalFilename", "jack_netonedriver.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp PortAudio Driver for Windows\0" VALUE "FileDescription", "Jackmp PortAudio Driver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_portaudio\0" VALUE "InternalName", "jack_portaudio\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_portaudio.dll\0" VALUE "OriginalFilename", "jack_portaudio.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jackmp WinMME Driver for Windows\0" VALUE "FileDescription", "Jackmp WinMME Driver for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "jack_portaudio\0" VALUE "InternalName", "jack_portaudio\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "jack_winmme.dll\0" VALUE "OriginalFilename", "jack_winmme.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jack client library for Windows\0" VALUE "FileDescription", "Jack client library for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "libjack\0" VALUE "InternalName", "libjack\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "libjack.dll\0" VALUE "OriginalFilename", "libjack.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jack Net library for Windows\0" VALUE "FileDescription", "Jack Net library for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "libjacknet\0" VALUE "InternalName", "libjacknet\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "libjacknet.dll\0" VALUE "OriginalFilename", "libjacknet.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
// Generated by ResEdit 1.4.3 2006-2013// Generated by ResEdit 1.4.3
// Copyright (C) 2006-2008 // Copyright (C) 2006-2008
// http://www.resedit.net // http://www.resedit.net
...@@ -25,7 +25,7 @@ BEGIN ...@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "Jack server library for Windows\0" VALUE "FileDescription", "Jack server library for Windows\0"
VALUE "FileVersion", "1, 9, 10\0" VALUE "FileVersion", "1, 9, 10\0"
VALUE "InternalName", "libjackserver\0" VALUE "InternalName", "libjackserver\0"
VALUE "LegalCopyright", "Copyright Grame 2006-2012\0" VALUE "LegalCopyright", "Copyright Grame 2006-2013\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "libjackserver.dll\0" VALUE "OriginalFilename", "libjackserver.dll\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
......
...@@ -46,6 +46,7 @@ PortAudioDevices::PortAudioDevices() ...@@ -46,6 +46,7 @@ PortAudioDevices::PortAudioDevices()
PortAudioDevices::~PortAudioDevices() PortAudioDevices::~PortAudioDevices()
{ {
jack_log("Terminate PortAudio...");
Pa_Terminate(); Pa_Terminate();
delete[] fDeviceInfo; delete[] fDeviceInfo;
......
...@@ -229,7 +229,7 @@ int JackPortAudioDriver::Open(jack_nframes_t buffer_size, ...@@ -229,7 +229,7 @@ int JackPortAudioDriver::Open(jack_nframes_t buffer_size,
err = OpenStream(buffer_size); err = OpenStream(buffer_size);
if (err != paNoError) { if (err != paNoError) {
jack_error("Pa_OpenStream error %d = %s", err, Pa_GetErrorText(err)); jack_error("Pa_OpenStream error = %s", Pa_GetErrorText(err));
goto error; goto error;
} }
...@@ -298,10 +298,12 @@ int JackPortAudioDriver::Attach() ...@@ -298,10 +298,12 @@ int JackPortAudioDriver::Attach()
int JackPortAudioDriver::Start() int JackPortAudioDriver::Start()
{ {
jack_log("JackPortAudioDriver::Start"); jack_log("JackPortAudioDriver::Start");
if (JackAudioDriver::Start() >= 0) { if (JackAudioDriver::Start() == 0) {
if (Pa_StartStream(fStream) == paNoError) { PaError err;
if ((err = Pa_StartStream(fStream)) == paNoError) {
return 0; return 0;
} }
jack_error("Pa_StartStream error = %s", Pa_GetErrorText(err))
JackAudioDriver::Stop(); JackAudioDriver::Stop();
} }
return -1; return -1;
...@@ -310,11 +312,15 @@ int JackPortAudioDriver::Start() ...@@ -310,11 +312,15 @@ int JackPortAudioDriver::Start()
int JackPortAudioDriver::Stop() int JackPortAudioDriver::Stop()
{ {
jack_log("JackPortAudioDriver::Stop"); jack_log("JackPortAudioDriver::Stop");
int res = (Pa_StopStream(fStream) == paNoError) ? 0 : -1; PaError err;
if ((err = Pa_StopStream(fStream)) != paNoError) {
jack_error("Pa_StopStream error = %s", Pa_GetErrorText(err));
}
if (JackAudioDriver::Stop() < 0) { if (JackAudioDriver::Stop() < 0) {
res = -1; return -1;
} else {
return (err == paNoError) ? 0 : -1;
} }
return res;
} }
int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size) int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size)
...@@ -332,7 +338,7 @@ int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size) ...@@ -332,7 +338,7 @@ int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size)
err = OpenStream(buffer_size); err = OpenStream(buffer_size);
if (err != paNoError) { if (err != paNoError) {
jack_error("Pa_OpenStream error %d = %s", err, Pa_GetErrorText(err)); jack_error("Pa_OpenStream error = %s", Pa_GetErrorText(err));
goto error; goto error;
} else { } else {
JackAudioDriver::SetBufferSize(buffer_size); // Generic change, never fails JackAudioDriver::SetBufferSize(buffer_size); // Generic change, never fails
......
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