Browse Source

Revert "Fix unused{,-but-set}-variable compiler warnings."

This reverts commit dde9f29a8e.

The commit introduced the following compiler error:

[100/255] Compiling posix/JackNetUnixSocket.cpp
../posix/JackNetUnixSocket.cpp: In member function 'int Jack::JackNetUnixSocket::NewSocket()':
../posix/JackNetUnixSocket.cpp:126:32: error: 'tos' was not declared in this scope
         socklen_t len = sizeof(tos);
tags/v1.9.13
Karl Linden 7 years ago
parent
commit
f5f22c6bef
No known key found for this signature in database GPG Key ID: C0F669D8CE2576AB
9 changed files with 44 additions and 15 deletions
  1. +12
    -0
      common/JackNetOneDriver.cpp
  2. +5
    -0
      example-clients/metro.c
  3. +2
    -0
      example-clients/midiseq.c
  4. +14
    -13
      linux/alsa/alsa_driver.c
  5. +2
    -1
      linux/alsa/alsa_seqmidi.c
  6. +3
    -0
      linux/alsa/hdsp.c
  7. +2
    -0
      posix/JackNetUnixSocket.cpp
  8. +2
    -1
      tests/cpu.c
  9. +2
    -0
      tests/test.cpp

+ 12
- 0
common/JackNetOneDriver.cpp View File

@@ -986,6 +986,9 @@ extern "C"
unsigned int latency = 5; unsigned int latency = 5;
unsigned int redundancy = 1; unsigned int redundancy = 1;
unsigned int mtu = 1400; unsigned int mtu = 1400;
#if HAVE_SAMPLERATE
unsigned int resample_factor_up = 1;
#endif
int dont_htonl_floats = 0; int dont_htonl_floats = 0;
int always_deadline = 0; int always_deadline = 0;
int jitter_val = 0; int jitter_val = 0;
@@ -1032,6 +1035,15 @@ extern "C"
#endif #endif
break; break;


case 'u':
#if HAVE_SAMPLERATE
resample_factor_up = param->value.ui;
#else
jack_error("not built with libsamplerate support");
return NULL;
#endif
break;

case 'b': case 'b':
bitdepth = param->value.ui; bitdepth = param->value.ui;
break; break;


+ 5
- 0
example-clients/metro.c View File

@@ -135,6 +135,7 @@ main (int argc, char *argv[])
int attack_percent = 1, decay_percent = 10, dur_arg = 100; int attack_percent = 1, decay_percent = 10, dur_arg = 100;
char *client_name = 0; char *client_name = 0;
char *bpm_string = "bpm"; char *bpm_string = "bpm";
int verbose = 0;
jack_status_t status; jack_status_t status;


const char *options = "f:A:D:a:d:b:n:thv"; const char *options = "f:A:D:a:d:b:n:thv";
@@ -149,6 +150,7 @@ main (int argc, char *argv[])
{"name", 1, 0, 'n'}, {"name", 1, 0, 'n'},
{"transport", 0, 0, 't'}, {"transport", 0, 0, 't'},
{"help", 0, 0, 'h'}, {"help", 0, 0, 'h'},
{"verbose", 0, 0, 'v'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };


@@ -196,6 +198,9 @@ main (int argc, char *argv[])
client_name = (char *) malloc ((strlen (optarg) + 1) * sizeof (char)); client_name = (char *) malloc ((strlen (optarg) + 1) * sizeof (char));
strcpy (client_name, optarg); strcpy (client_name, optarg);
break; break;
case 'v':
verbose = 1;
break;
case 't': case 't':
transport_aware = 1; transport_aware = 1;
break; break;


+ 2
- 0
example-clients/midiseq.c View File

@@ -82,6 +82,7 @@ static int process(jack_nframes_t nframes, void *arg)
int main(int narg, char **args) int main(int narg, char **args)
{ {
int i; int i;
jack_nframes_t nframes;
if ((narg<6) || ((narg-3)%3 != 0)) { if ((narg<6) || ((narg-3)%3 != 0)) {
usage(); usage();
exit(1); exit(1);
@@ -92,6 +93,7 @@ int main(int narg, char **args)
} }
jack_set_process_callback (client, process, 0); jack_set_process_callback (client, process, 0);
output_port = jack_port_register (client, "out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0); output_port = jack_port_register (client, "out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
nframes = jack_get_buffer_size(client);
loop_index = 0; loop_index = 0;
num_notes = (narg - 3)/3; num_notes = (narg - 3)/3;
note_frqs = malloc(num_notes*sizeof(unsigned char)); note_frqs = malloc(num_notes*sizeof(unsigned char));


+ 14
- 13
linux/alsa/alsa_driver.c View File

@@ -625,6 +625,7 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
channel_t chn; channel_t chn;
unsigned int pr = 0; unsigned int pr = 0;
unsigned int cr = 0; unsigned int cr = 0;
int err;


driver->frame_rate = rate; driver->frame_rate = rate;
driver->frames_per_cycle = frames_per_cycle; driver->frames_per_cycle = frames_per_cycle;
@@ -716,14 +717,14 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
if (driver->playback_handle) { if (driver->playback_handle) {
snd_pcm_access_t access; snd_pcm_access_t access;


snd_pcm_hw_params_get_period_size (
driver->playback_hw_params, &p_period_size, &dir);
snd_pcm_hw_params_get_format (
driver->playback_hw_params,
&(driver->playback_sample_format))
snd_pcm_hw_params_get_access (driver->playback_hw_params,
err = snd_pcm_hw_params_get_period_size (
driver->playback_hw_params, &p_period_size, &dir);
err = snd_pcm_hw_params_get_format (
driver->playback_hw_params,
&(driver->playback_sample_format));
err = snd_pcm_hw_params_get_access (driver->playback_hw_params,
&access); &access);
driver->playback_interleaved =
driver->playback_interleaved =
(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
|| (access == SND_PCM_ACCESS_MMAP_COMPLEX); || (access == SND_PCM_ACCESS_MMAP_COMPLEX);


@@ -739,14 +740,14 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
if (driver->capture_handle) { if (driver->capture_handle) {
snd_pcm_access_t access; snd_pcm_access_t access;


snd_pcm_hw_params_get_period_size (
driver->capture_hw_params, &c_period_size, &dir);
snd_pcm_hw_params_get_format (
driver->capture_hw_params,
err = snd_pcm_hw_params_get_period_size (
driver->capture_hw_params, &c_period_size, &dir);
err = snd_pcm_hw_params_get_format (
driver->capture_hw_params,
&(driver->capture_sample_format)); &(driver->capture_sample_format));
snd_pcm_hw_params_get_access (driver->capture_hw_params,
err = snd_pcm_hw_params_get_access (driver->capture_hw_params,
&access); &access);
driver->capture_interleaved =
driver->capture_interleaved =
(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
|| (access == SND_PCM_ACCESS_MMAP_COMPLEX); || (access == SND_PCM_ACCESS_MMAP_COMPLEX);




+ 2
- 1
linux/alsa/alsa_seqmidi.c View File

@@ -856,6 +856,7 @@ void do_jack_output(alsa_seqmidi_t *self, port_t *port, struct process_info* inf
int64_t frame_offset; int64_t frame_offset;
int64_t out_time; int64_t out_time;
snd_seq_real_time_t out_rt; snd_seq_real_time_t out_rt;
int err;


jack_midi_event_get(&jack_event, port->jack_buf, i); jack_midi_event_get(&jack_event, port->jack_buf, i);


@@ -895,7 +896,7 @@ void do_jack_output(alsa_seqmidi_t *self, port_t *port, struct process_info* inf
out_rt.tv_sec = out_time / NSEC_PER_SEC; out_rt.tv_sec = out_time / NSEC_PER_SEC;
snd_seq_ev_schedule_real(&alsa_event, self->queue, 0, &out_rt); snd_seq_ev_schedule_real(&alsa_event, self->queue, 0, &out_rt);


snd_seq_event_output(self->seq, &alsa_event);
err = snd_seq_event_output(self->seq, &alsa_event);
debug_log("alsa_out: written %d bytes to %s at %+d (%lld): %d", (int)jack_event.size, port->name, (int)frame_offset, out_time, err); debug_log("alsa_out: written %d bytes to %s at %+d (%lld): %d", (int)jack_event.size, port->name, (int)frame_offset, out_time, err);
} }
} }


+ 3
- 0
linux/alsa/hdsp.c View File

@@ -39,6 +39,9 @@ static const int hdsp_num_input_channels = 52;
static const int hdsp_physical_input_index[] = { static const int hdsp_physical_input_index[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}; 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
static const int hdsp_audio_stream_index[] = {
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};


/* /*
* Use this array to choose the value of the output_channel * Use this array to choose the value of the output_channel


+ 2
- 0
posix/JackNetUnixSocket.cpp View File

@@ -111,6 +111,8 @@ namespace Jack
StrError(NET_ERROR_CODE); StrError(NET_ERROR_CODE);
} }
int tos = 0; /* see <netinet/in.h> */
/* /*
DSCP Field Hex/Bin/Dec Layer 2 Prio Traffic Type Acronym WMM Access Category DSCP Field Hex/Bin/Dec Layer 2 Prio Traffic Type Acronym WMM Access Category
0x38 / 111000 / 56 7 Network Control NC AC_VO 0x38 / 111000 / 56 7 Network Control NC AC_VO


+ 2
- 1
tests/cpu.c View File

@@ -78,9 +78,10 @@ int update_buffer_size(jack_nframes_t nframes, void *arg)


int process(jack_nframes_t nframes, void *arg) int process(jack_nframes_t nframes, void *arg)
{ {
jack_default_audio_sample_t *out;
jack_default_audio_sample_t *in, *out;
jack_nframes_t start_frame = jack_frame_time(client); jack_nframes_t start_frame = jack_frame_time(client);


in = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port, nframes);
out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes); out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes);
memset(out, 0, sizeof (jack_default_audio_sample_t) * nframes); memset(out, 0, sizeof (jack_default_audio_sample_t) * nframes);




+ 2
- 0
tests/test.cpp View File

@@ -494,6 +494,8 @@ int process5(jack_nframes_t nframes, void *arg)
static jack_nframes_t first_current_frames; static jack_nframes_t first_current_frames;
static jack_time_t first_current_usecs; static jack_time_t first_current_usecs;
static jack_time_t first_next_usecs; static jack_time_t first_next_usecs;
static float first_period_usecs;
static int res1 = jack_get_cycle_times(client, &first_current_frames, &first_current_usecs, &first_next_usecs, &first_period_usecs);
jack_nframes_t current_frames; jack_nframes_t current_frames;
jack_time_t current_usecs; jack_time_t current_usecs;


Loading…
Cancel
Save