Browse Source

Cleanup for compilation with gcc 4.3

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3257 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.1
sletz 16 years ago
parent
commit
ead2ee061a
2 changed files with 4 additions and 9 deletions
  1. +3
    -8
      tests/external_metro.cpp
  2. +1
    -1
      tests/external_metro.h

+ 3
- 8
tests/external_metro.cpp View File

@@ -56,23 +56,18 @@ void ExternalMetro::shutdown (void* arg)
printf("shutdown called..\n"); printf("shutdown called..\n");
} }


ExternalMetro::ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name)
ExternalMetro::ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, const char* client_name)
{ {
sample_t scale; sample_t scale;
int i, attack_length, decay_length; int i, attack_length, decay_length;
double *amp; double *amp;
int attack_percent = 1, decay_percent = 10; int attack_percent = 1, decay_percent = 10;
char *bpm_string = "bpm";
const char *bpm_string = "bpm";
jack_options_t options = JackNullOption; jack_options_t options = JackNullOption;
jack_status_t status;

jack_status_t status;
offset = 0; offset = 0;


/* Initial Jack setup, get sample rate */ /* Initial Jack setup, get sample rate */
if (!client_name) {
client_name = (char *) malloc (9 * sizeof (char));
strcpy (client_name, "metro");
}
if ((client = jack_client_open (client_name, options, &status)) == 0) { if ((client = jack_client_open (client_name, options, &status)) == 0) {
fprintf (stderr, "jack server not running?\n"); fprintf (stderr, "jack server not running?\n");
throw -1; throw -1;


+ 1
- 1
tests/external_metro.h View File

@@ -55,7 +55,7 @@ extern "C"
sample_t *wave; sample_t *wave;
long offset ; long offset ;


ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, char* client_name);
ExternalMetro(int freq, double max_amp, int dur_arg, int bpm, const char* client_name = "metro");
virtual ~ExternalMetro(); virtual ~ExternalMetro();


static int process_audio (jack_nframes_t nframes, void* arg); static int process_audio (jack_nframes_t nframes, void* arg);


Loading…
Cancel
Save