mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 00:23:32 +02:00
Minor bug fixes for EXPERIMENTAL_MIDI_OUT. Also added files for autoconf/automake to portmidi and libscorealign. I also modified my local build-related files in src and lib-src to handle EXPERIMENTAL_MIDI_OUT and EXPERIMENTAL_SCOREALIGN, but while I can build with these options, the build-related files are not entirely working, so I will not commit them and break the "normal" builds. I suspect these new build files in this commit are not entirely correct -- some review is in order.
This commit is contained in:
@@ -2,6 +2,16 @@ README_LINUX.txt for PortMidi
|
||||
Roger Dannenberg
|
||||
14 Oct 2009
|
||||
|
||||
Contents:
|
||||
To make PortMidi
|
||||
The pmdefaults program
|
||||
Setting LD_LIBRARY_PATH
|
||||
A note about amd64
|
||||
Using autoconf
|
||||
Using configure
|
||||
Changelog
|
||||
|
||||
|
||||
To make PortMidi, you need cmake and the Java SDK.
|
||||
Go back up to the portmidi directory and type:
|
||||
|
||||
@@ -88,6 +98,43 @@ http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
|
||||
On certain architectures (AMD64 amongst them), shared libraries *must*
|
||||
be "PIC-enabled".
|
||||
|
||||
USING AUTOCONF
|
||||
|
||||
Audacity (the audio editor ) uses an autoconf-based build system, and
|
||||
the files are also included in the PortMidi download. The associated
|
||||
files are tested only in the context of building Audacity, but if you
|
||||
really prefer autoconf to cmake or want to include portmidi in another
|
||||
autoconf-based project (like Audacity), maybe this will be useful.
|
||||
|
||||
The files are: configure.ac, portmidi-uninstalled.pc.in, portmidi.pc.in,
|
||||
and everything in autotools/.
|
||||
|
||||
To build from these files, run aclocal, which will produce
|
||||
aclocal.m4 and autom4te.cache
|
||||
|
||||
Run autoconf, which will produce
|
||||
configure
|
||||
|
||||
Run automake, which will produce
|
||||
Makefile.in
|
||||
|
||||
Now that you have a configure and Makefile.in,
|
||||
continue with the next section.
|
||||
|
||||
|
||||
USING CONFIGURE
|
||||
|
||||
Run ./configure to produce:
|
||||
config.status
|
||||
Makefile
|
||||
portmidi.pc
|
||||
portmidi-uninstalled.pc
|
||||
|
||||
|
||||
Finally, run make to create
|
||||
|
||||
|
||||
|
||||
CHANGELOG
|
||||
|
||||
22-jan-2010 Roger B. Dannenberg
|
||||
|
@@ -5,7 +5,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "portmidi.h"
|
||||
#include "pmutil.h"
|
||||
#include "pminternal.h"
|
||||
|
||||
#define STRING_MAX 256
|
||||
|
||||
@@ -27,7 +30,7 @@ int match_string(FILE *inf, char *s)
|
||||
|
||||
|
||||
/*
|
||||
/* Parse preference files, find default device, search devices --
|
||||
* Parse preference files, find default device, search devices --
|
||||
*/
|
||||
PmDeviceID find_default_device(char *path, int input, PmDeviceID id)
|
||||
/* path -- the name of the preference we are searching for
|
||||
@@ -80,7 +83,7 @@ PmDeviceID find_default_device(char *path, int input, PmDeviceID id)
|
||||
pref_str[i] = c;
|
||||
}
|
||||
if (i == STRING_MAX) continue; // value too long, ignore
|
||||
pref_str[i] == 0;
|
||||
pref_str[i] = 0;
|
||||
i = pm_find_default_device(pref_str, input);
|
||||
if (i != pmNoDevice) {
|
||||
id = i;
|
||||
|
@@ -201,7 +201,7 @@ static PmError alsa_write_byte(PmInternal *midi, unsigned char byte,
|
||||
/* compute relative time of event = timestamp - now + latency */
|
||||
PmTimestamp now = (midi->time_proc ?
|
||||
midi->time_proc(midi->time_info) :
|
||||
Pt_Time(NULL));
|
||||
Pt_Time());
|
||||
int when = timestamp;
|
||||
/* if timestamp is zero, send immediately */
|
||||
/* otherwise compute time delay and use delay if positive */
|
||||
@@ -242,8 +242,8 @@ static PmError alsa_out_close(PmInternal *midi)
|
||||
alsa_descriptor_type desc = (alsa_descriptor_type) midi->descriptor;
|
||||
if (!desc) return pmBadPtr;
|
||||
|
||||
if (pm_hosterror = snd_seq_disconnect_to(seq, desc->this_port,
|
||||
desc->client, desc->port)) {
|
||||
if ((pm_hosterror = snd_seq_disconnect_to(seq, desc->this_port,
|
||||
desc->client, desc->port))) {
|
||||
// if there's an error, try to delete the port anyway, but don't
|
||||
// change the pm_hosterror value so we retain the first error
|
||||
snd_seq_delete_port(seq, desc->this_port);
|
||||
@@ -332,8 +332,8 @@ static PmError alsa_in_close(PmInternal *midi)
|
||||
{
|
||||
alsa_descriptor_type desc = (alsa_descriptor_type) midi->descriptor;
|
||||
if (!desc) return pmBadPtr;
|
||||
if (pm_hosterror = snd_seq_disconnect_from(seq, desc->this_port,
|
||||
desc->client, desc->port)) {
|
||||
if ((pm_hosterror = snd_seq_disconnect_from(seq, desc->this_port,
|
||||
desc->client, desc->port))) {
|
||||
snd_seq_delete_port(seq, desc->this_port); /* try to close port */
|
||||
} else {
|
||||
pm_hosterror = snd_seq_delete_port(seq, desc->this_port);
|
||||
|
@@ -3,4 +3,5 @@
|
||||
PmError pm_linuxalsa_init(void);
|
||||
void pm_linuxalsa_term(void);
|
||||
|
||||
PmDeviceID find_default_device(char *path, int input, PmDeviceID id);
|
||||
|
||||
|
Reference in New Issue
Block a user