| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| Copyright (C) 2002 Anthony Van Groningen | Copyright (C) 2002 Anthony Van Groningen | ||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU General Public License as published by | ||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2 of the License, or | ||||
| @@ -60,19 +60,19 @@ usage () | |||||
| } | } | ||||
| void | void | ||||
| process_silence (jack_nframes_t nframes) | |||||
| process_silence (jack_nframes_t nframes) | |||||
| { | { | ||||
| sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes); | sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes); | ||||
| memset (buffer, 0, sizeof (jack_default_audio_sample_t) * nframes); | memset (buffer, 0, sizeof (jack_default_audio_sample_t) * nframes); | ||||
| } | } | ||||
| void | void | ||||
| process_audio (jack_nframes_t nframes) | |||||
| process_audio (jack_nframes_t nframes) | |||||
| { | { | ||||
| sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes); | sample_t *buffer = (sample_t *) jack_port_get_buffer (output_port, nframes); | ||||
| jack_nframes_t frames_left = nframes; | jack_nframes_t frames_left = nframes; | ||||
| while (wave_length - offset < frames_left) { | while (wave_length - offset < frames_left) { | ||||
| memcpy (buffer + (nframes - frames_left), wave + offset, sizeof (sample_t) * (wave_length - offset)); | memcpy (buffer + (nframes - frames_left), wave + offset, sizeof (sample_t) * (wave_length - offset)); | ||||
| frames_left -= wave_length - offset; | frames_left -= wave_length - offset; | ||||
| @@ -111,7 +111,7 @@ sample_rate_change () { | |||||
| int | int | ||||
| main (int argc, char *argv[]) | main (int argc, char *argv[]) | ||||
| { | { | ||||
| sample_t scale; | sample_t scale; | ||||
| int i, attack_length, decay_length; | int i, attack_length, decay_length; | ||||
| double *amp; | double *amp; | ||||
| @@ -140,7 +140,7 @@ main (int argc, char *argv[]) | |||||
| {"verbose", 0, 0, 'v'}, | {"verbose", 0, 0, 'v'}, | ||||
| {0, 0, 0, 0} | {0, 0, 0, 0} | ||||
| }; | }; | ||||
| while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) { | while ((opt = getopt_long (argc, argv, options, long_options, &option_index)) != EOF) { | ||||
| switch (opt) { | switch (opt) { | ||||
| case 'f': | case 'f': | ||||
| @@ -192,7 +192,7 @@ main (int argc, char *argv[]) | |||||
| transport_aware = 1; | transport_aware = 1; | ||||
| break; | break; | ||||
| default: | default: | ||||
| fprintf (stderr, "unknown option %c\n", opt); | |||||
| fprintf (stderr, "unknown option %c\n", opt); | |||||
| case 'h': | case 'h': | ||||
| usage (); | usage (); | ||||
| return -1; | return -1; | ||||
| @@ -264,5 +264,5 @@ main (int argc, char *argv[]) | |||||
| while (1) { | while (1) { | ||||
| sleep(1); | sleep(1); | ||||
| }; | }; | ||||
| } | } | ||||