Browse Source

std::exception used by reference.

tags/v1.9.10
Stephane Letz 12 years ago
parent
commit
dc22edecc9
3 changed files with 16 additions and 16 deletions
  1. +3
    -3
      common/shm.c
  2. +8
    -8
      macosx/coremidi/JackCoreMidiDriver.cpp
  3. +5
    -5
      windows/winmme/JackWinMMEDriver.cpp

+ 3
- 3
common/shm.c View File

@@ -611,7 +611,7 @@ jack_cleanup_shm ()
} else { } else {


/* see if allocator still exists */ /* see if allocator still exists */
#ifdef WIN32 // steph
#ifdef WIN32
//jack_info("TODO: kill API not available !!"); //jack_info("TODO: kill API not available !!");
#else #else
if (kill (r->allocator, 0)) { if (kill (r->allocator, 0)) {
@@ -741,7 +741,7 @@ jack_access_registry (jack_shm_info_t *ri)
jack_shm_header = ri->ptr.attached_at; jack_shm_header = ri->ptr.attached_at;
jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1); jack_shm_registry = (jack_shm_registry_t *) (jack_shm_header + 1);


close (shm_fd); // steph
close (shm_fd);
return 0; return 0;
} }


@@ -800,7 +800,7 @@ jack_create_registry (jack_shm_info_t *ri)


/* initialize registry contents */ /* initialize registry contents */
jack_shm_init_registry (); jack_shm_init_registry ();
close (shm_fd); // steph
close (shm_fd);
return 0; return 0;
} }




+ 8
- 8
macosx/coremidi/JackCoreMidiDriver.cpp View File

@@ -136,7 +136,7 @@ bool JackCoreMidiDriver::OpenAux()
try { try {
physical_input_ports = physical_input_ports =
new JackCoreMidiPhysicalInputPort*[potential_pi_count]; new JackCoreMidiPhysicalInputPort*[potential_pi_count];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating physical " jack_error("JackCoreMidiDriver::Open - while creating physical "
"input port array: %s", e.what()); "input port array: %s", e.what());
goto destroy; goto destroy;
@@ -149,7 +149,7 @@ bool JackCoreMidiDriver::OpenAux()
capture_driver_name, i, capture_driver_name, i,
client, internal_input, client, internal_input,
time_ratio); time_ratio);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating " jack_error("JackCoreMidiDriver::Open - while creating "
"physical input port: %s", e.what()); "physical input port: %s", e.what());
goto destroy; goto destroy;
@@ -172,7 +172,7 @@ bool JackCoreMidiDriver::OpenAux()
try { try {
physical_output_ports = physical_output_ports =
new JackCoreMidiPhysicalOutputPort*[potential_po_count]; new JackCoreMidiPhysicalOutputPort*[potential_po_count];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating physical " jack_error("JackCoreMidiDriver::Open - while creating physical "
"output port array: %s", e.what()); "output port array: %s", e.what());
goto destroy; goto destroy;
@@ -185,7 +185,7 @@ bool JackCoreMidiDriver::OpenAux()
playback_driver_name, i, playback_driver_name, i,
client, internal_output, client, internal_output,
time_ratio); time_ratio);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating " jack_error("JackCoreMidiDriver::Open - while creating "
"physical output port: %s", e.what()); "physical output port: %s", e.what());
goto destroy; goto destroy;
@@ -199,7 +199,7 @@ bool JackCoreMidiDriver::OpenAux()
try { try {
virtual_input_ports = virtual_input_ports =
new JackCoreMidiVirtualInputPort*[in_channels]; new JackCoreMidiVirtualInputPort*[in_channels];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating virtual " jack_error("JackCoreMidiDriver::Open - while creating virtual "
"input port array: %s", e.what()); "input port array: %s", e.what());
goto destroy; goto destroy;
@@ -212,7 +212,7 @@ bool JackCoreMidiDriver::OpenAux()
capture_driver_name, capture_driver_name,
vi_count, vi_count + pi_count, client, vi_count, vi_count + pi_count, client,
time_ratio); time_ratio);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating virtual " jack_error("JackCoreMidiDriver::Open - while creating virtual "
"input port: %s", e.what()); "input port: %s", e.what());
goto destroy; goto destroy;
@@ -225,7 +225,7 @@ bool JackCoreMidiDriver::OpenAux()
try { try {
virtual_output_ports = virtual_output_ports =
new JackCoreMidiVirtualOutputPort*[out_channels]; new JackCoreMidiVirtualOutputPort*[out_channels];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating virtual " jack_error("JackCoreMidiDriver::Open - while creating virtual "
"output port array: %s", e.what()); "output port array: %s", e.what());
goto destroy; goto destroy;
@@ -237,7 +237,7 @@ bool JackCoreMidiDriver::OpenAux()
playback_driver_name, playback_driver_name,
vo_count, vo_count + po_count, client, vo_count, vo_count + po_count, client,
time_ratio); time_ratio);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackCoreMidiDriver::Open - while creating virtual " jack_error("JackCoreMidiDriver::Open - while creating virtual "
"output port: %s", e.what()); "output port: %s", e.what());
goto destroy; goto destroy;


+ 5
- 5
windows/winmme/JackWinMMEDriver.cpp View File

@@ -21,7 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <cmath> #include <cmath>


#include "JackEngineControl.h" #include "JackEngineControl.h"
#include "JackWinMMEDriver.h"
#include "JackWinMMEDriver.h"
#include "driver_interface.h" #include "driver_interface.h"


using Jack::JackWinMMEDriver; using Jack::JackWinMMEDriver;
@@ -170,7 +170,7 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
if (num_potential_inputs) { if (num_potential_inputs) {
try { try {
input_ports = new JackWinMMEInputPort *[num_potential_inputs]; input_ports = new JackWinMMEInputPort *[num_potential_inputs];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackWinMMEDriver::Open - while creating input port " jack_error("JackWinMMEDriver::Open - while creating input port "
"array: %s", e.what()); "array: %s", e.what());
goto unset_timer_resolution; goto unset_timer_resolution;
@@ -180,7 +180,7 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
input_ports[input_count] = input_ports[input_count] =
new JackWinMMEInputPort(fAliasName, client_name, new JackWinMMEInputPort(fAliasName, client_name,
capture_driver_name, i); capture_driver_name, i);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackWinMMEDriver::Open - while creating input " jack_error("JackWinMMEDriver::Open - while creating input "
"port: %s", e.what()); "port: %s", e.what());
continue; continue;
@@ -191,7 +191,7 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
if (num_potential_outputs) { if (num_potential_outputs) {
try { try {
output_ports = new JackWinMMEOutputPort *[num_potential_outputs]; output_ports = new JackWinMMEOutputPort *[num_potential_outputs];
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackWinMMEDriver::Open - while creating output port " jack_error("JackWinMMEDriver::Open - while creating output port "
"array: %s", e.what()); "array: %s", e.what());
goto destroy_input_ports; goto destroy_input_ports;
@@ -201,7 +201,7 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
output_ports[output_count] = output_ports[output_count] =
new JackWinMMEOutputPort(fAliasName, client_name, new JackWinMMEOutputPort(fAliasName, client_name,
playback_driver_name, i); playback_driver_name, i);
} catch (std::exception e) {
} catch (std::exception& e) {
jack_error("JackWinMMEDriver::Open - while creating output " jack_error("JackWinMMEDriver::Open - while creating output "
"port: %s", e.what()); "port: %s", e.what());
continue; continue;


Loading…
Cancel
Save